//
//  LuruViewController.swift
//  BusinessIOS
//
//  Created by Rain on 2018/12/27.
//  Copyright © 2018 XingJian Li. All rights reserved.
//

import UIKit
import Photos
import Alamofire
class LuruViewController: UIViewController{

    var tableView: UITableView!
    
    var luruButton:UIButton!
    
    var xiangmuString:String!
    
    var xiangmuStrings:String!
    
    
    var guoneiString:String!
    
    
    var guoneitouzidizhiString:String!
    
    var wubaiString:String!
    
    
    var gengxinString:String!
    
    var gengxinStrings:String!
    
    var tuisong:String!
    
    
    var shinei:String!
    
    
    var xingzhi:String!
    var xingzhis:String!
    
    
    
    var danweidizhi:String!
    
    
    var qianyueStrig:String!
    var qianyueStrigs:String!
    
    
     var chnayeleibieStrig:String!
    
    var chnayeleibieStrigs:String!
 
    
    var gongshangqingkuangStrig:String!
    var gongshangqingkuangStrigs:String!
    
    var lixiangshenpiStrig:String!
    var lixiangshenpiStrigs:String!
    
    
    var huanbaoshenpiStrig:String!
    var huanbaoshenpiStrigs:String!
    
    
    var yongdishenpiStrig:String!
    var yongdishenpiStrigs:String!
    
    var guihuashenpiStrig:String!
    var guihuashenpiStrigs:String!
    
   
    
    var jiansheshenpiStrig:String!
    
    var jiansheshenpiStrigs:String!
    
    
    var namestring:String!
    
    var photostring:String!
    
    var banlirenid:String!
    
    var banlirenids:String!
    
    var shenpinamestring:String!
    
    var shenpiphotostring:String!
    
    var shenpirenid:String!
    
    
    //0区
    var xiangmumingchengString:String!
    
     var xiangmumingchengStrings:String!
    
    
    
    
    var xiangmujianjieString:String!
    
    var xiangmujianjieStrings:String!
    
    var duijieqingkuangString:String!
    
    var duijieqingkuangStrings:String!
    
    
    
    
    //1区
    var xiangmufangmingziString:String!
    var xiangmufangmingziStrings:String!
    
    
    var guowaidizhiString:String!
    var guowaidizhiStrings:String!
    
    
    var xiangmufanglianxirenString:String!
    var xiangmufanglianxirenStrings:String!
    
    var xiangmufangdianhuaString:String!
    var xiangmufangdianhuaStrings:String!
    
    //2区
    var shineixiangmumingchengString:String!
    var shineixiangmumingchengStrings:String!
    
    var shineidanweifuzerenString:String!
    var shineidanweifuzerenStrings:String!
    
    var shineilianxirenString:String!
    var shineilianxirenStrings:String!
    
    var shineilianxirendianhuaString:String!
    var shineilianxirendianhuaStrings:String!
    
    var shineiyindaorenString:String!
    var shineiyindaorenStrings:String!
    
    var shineiyindaorendianhuaString:String!
    var shineiyindaorendianhuaStrings:String!
    //3区
    var xiangmuwentimiaoshuString:String!
    var xiangmuwentimiaoshuStrings:String!
    
     var xiangmushengshixianString:String!
    
    
    var xiangmushengshixianStrings:String!
    
    var xiangmubumenmingchengString:String!
    var xiangmubumenmingchengStrings:String!
    
    
    var xiangmuxieyitouzieString:String!
    var xiangmuxieyitouzieStrings:String!
    
    var xiangmujianshejibenString:String!
    var xiangmujianshejibenStrings:String!
    
    var xiangmujianshediString:String!
    var xiangmujianshediStrings:String!
    
    var xiangmutouzixieyishuString:String!
    var xiangmutouzixieyishuStrings:String!
    
    var xiangmulvxingshijianString:String!
    var xiangmulvxingshijianStrings:String!
    
    var xiangmuleijidaoweizijinString:String!
    var xiangmuleijidaoweizijinStrings:String!
    
    
    var xiangmudangniandaoweizijinString:String!
    var xiangmudangniandaoweizijinStrings:String!
    
    var xiangmunaruleijidaoweizijinString:String!
    var xiangmunaruleijidaoweizijinStrings:String!
    
    var xiangmunarudangniandaoweizijinString:String!
    var xiangmunarudangniandaoweizijinStrings:String!
    
    var xiangmudaoweizijincailiaoString:String!
    var xiangmudaoweizijincailiaoStrings:String!
    
    
    //4区
    
    var gongshangpifuString:String!
    var gongshangpifuStrings:String!
    
    var lixiangpifuString:String!
    var lixiangpifuStrings:String!
    
    var huanbaopifuString:String!
    var huanbaopifuStrings:String!
    
    var yongdipifuString:String!
    var yongdipifuStrings:String!
    
    var guihuapifuString:String!
    var guihuapifuStrings:String!
    
    
    var jianshepifuString:String!
    var jianshepifuStrings:String!
    
    //5区
    var xiangmuwanchengniandujihuaString:String!
    var xiangmuwanchengniandujihuaStrings:String!
    
    var xiangmuwanchengniandushiwujihuaString:String!
     var xiangmuwanchengniandushiwujihuaStrings:String!
    
    var xiangmuwanchenggongchengString:String!
    var xiangmuwanchenggongchengStrings:String!
    
    var xiangmutuijinjihuaString:String!
    var xiangmutuijinjihuaStrings:String!
    
    var xiangmukaigongshijianString:String!
    var xiangmukaigongshijianStrings:String!
    
    var xiangmukaigongxukezhengString:String!
    var xiangmukaigongxukezhengStrings:String!
    
    //6区
    var xiangmuzongzhandimianjiString:String!
    var xiangmuzongzhandimianjiStrings:String!
    
    var xiangmuzongjianzhumianjiString:String!
    var xiangmuzongjianzhumianjiStrings:String!
    
    var xiangmutouziqiangduString:String!
    var xiangmutouziqiangduStrings:String!
    
    var xiangmujiuyerenshuString:String!
    var xiangmujiuyerenshuStrings:String!
    
    var xiangmunianzongchanzhiString:String!
    var xiangmunianzongchanzhiStrings:String!
    
    var xiangmunianshangshuifeizongeString:String!
    var xiangmunianshangshuifeizongeStrings:String!
    
    var xiangmutouchanshijianString:String!
    var xiangmutouchanshijianStrings:String!
    
    var xiangmujungongyanshouString:String!
    var xiangmujungongyanshouStrings:String!
    
    //7区
    var touchanhoujiuyerenshu:String!
    
    var touchanhoujiuyerenshus:String!
    
    
    var touchannianchanzongzhi:String!
    var touchannianchanzongzhis:String!
    
    var nianshangshuifeizonge:String!
    var nianshangshuifeizonges:String!
    
    
    
    var guojia: NSInteger!
    
    
    var touzifangguojiadizhi: String!
    
    
    var shifoutuisong:String!
    var shifoutuisongs:String!
    
    
    
    
    
    var Photoimages = [Any]()
    var Besa64Photoimage = [String]()
    var Besa64Photoimages = [String]()
    
    
    
    
    var xinwenimages = [Any]()
    var Besa64xinwenimage = [String]()
    var Besa64xinwenimages = [String]()
    
    
    
    var chanpinimages = [Any]()
    var Besa64chanpinimage = [String]()
    var Besa64chanpinimages = [String]()
    
    
    
    var kaigongimages = [Any]()
    var Besa64kaigongimage = [String]()
    var Besa64kaigongimages = [String]()
    
    
    
    var xiangmuPhotoimages = [Any]()
    var Besa64xiangmuPhotoimage = [String]()
    var Besa64xiangmuPhotoimages = [String]()
    
    
    var touzifangshenID:String!
    var touzifangshenIDs:String!
    var touzifangshenName:String!
    
    var touzifangshiID:String!
    var touzifangshiIDs:String!
    var touzifangshiName:String!
    
    
    var touzifangxianID:String!
    var touzifangxianIDs:String!
    var touzifangxianName:String!
    
    
    

    var hezuofangshenName:String!
    

    var hezuofangshenID:String!
    
    
    var guoneishenID:String!
    var guoneishiID:String!
    
    var guoneixianID:String!
    
    
    
    
    
    var shifouwubaiqingString:String!
    var shifouwubaiqingStrings:String!
    
    
    var shineixiangmuhezuofangString:String!
    var shineixiangmuhezuofangStrings:String!
    

    
    var tuisongnamestring:String!
    var tuisongphotostring:String!
    var tuisongrenid:String!
    
    var tuisongrenids:String!
    
    
    var wentinamestring:String!
    var wentiphotostring:String!
    var wentirenid:String!
    
    var wentirenids:String!

    
   var nameArray : [String] = ["项目进度","项目名称","项目简介","对接情况"]
    
    var xiangmutouzifangArray : [String] = ["投资方名称/姓名","是否国内","国内投资方地址","联系人","是否500强"]
    
    var shineihezuofangArray : [String] = ["项目合作方","单位名称","单位性质","单位地址","单位负责人","联系人","联系电话","项目引荐人","引荐人电话"]
    var jinzhanArray : [String] = ["问题描述","省市县","部门名称","签约时间","协议投资额(万元)","产业类别","项目建设基本内容","项目建设地","签约照片","","新闻报道","","投资协议书","履行时间","累计到位资金","当年到位资金","纳入固定资产投资统计累计到位资金","纳入固定资产投资统计当年到位资金","到位资金证明材料"]
    var qingkuangArray : [String] = ["工商登记情况","批复文号","立项审批","批复文号","环保审批情况","批复文号","用地审批情况","批复文号","规划审批情况","批复文号","建设审批情况","批复文号"]
    var xiangmujiansheArray : [String] = ["完成年度投资计划百分比","完成年度实物工程量计划百分比","工程进度","项目推进计划","开工时间","开工许可证","开工仪式照片","","项目进度实景照片",""]
    
    var yuguxiaoyiArray : [String] = ["总占地面积","总建筑面积","投资强度","就业人数","年总产值","年上缴税费总额","投产时间","竣工验收报告","产品下线照片",""]
    
    var shijixiaoyiArray : [String] = ["就业人数","年产总值","年上缴税费总额","更新时间","是否推送"]
    
    //办理人
    @objc func namephoto(nofi : Notification){
        self.namestring = nofi.userInfo!["name"] as? String
        self.photostring = nofi.userInfo!["photo"] as? String
        
        self.banlirenid = nofi.userInfo!["id"] as? String
        self.tableView.reloadData()
    }
    //审批人
    @objc func shenpinamephoto(nofi : Notification){
        self.shenpinamestring = nofi.userInfo!["name"] as? String
        self.shenpiphotostring = nofi.userInfo!["photo"] as? String
        
        self.shenpirenid = nofi.userInfo!["id"] as? String
        self.tableView.reloadData()
    }
    
    //推送人
    @objc func tuisongnamephoto(nofi : Notification){
        self.tuisongnamestring = nofi.userInfo!["name"] as? String
        self.tuisongphotostring = nofi.userInfo!["photo"] as? String
        
        self.tuisongrenid = nofi.userInfo!["id"] as? String
        self.tableView.reloadData()
        
        
        
        print("tuisongnamestrin===\(self.tuisongnamestring)")
    }
    
    //问题单描述人
    
    @objc func wentinamephoto(nofi : Notification){
        self.wentinamestring = nofi.userInfo!["name"] as? String
        self.wentiphotostring = nofi.userInfo!["photo"] as? String
        
        self.wentirenid = nofi.userInfo!["id"] as? String
        self.tableView.reloadData()
    }
    
    
    @objc func touzifangNotification(nofi : Notification){
        self.touzifangshenID = nofi.userInfo!["shenID"] as? String
        self.touzifangshenName = nofi.userInfo!["shenName"] as? String
        
        self.touzifangshiID = nofi.userInfo!["shiID"] as? String
        self.touzifangshiName = nofi.userInfo!["shiName"] as? String
        
        
        self.touzifangxianID = nofi.userInfo!["xianID"] as? String
        self.touzifangxianName = nofi.userInfo!["xianName"] as? String
        
      
        self.tableView.reloadData()
    }
    
    
    @objc func hezuofangNotification(nofi : Notification){
        
        self.hezuofangshenID = nofi.userInfo!["shenID"] as? String
        self.hezuofangshenName = nofi.userInfo!["shenName"] as? String
        

        
       
        self.tableView.reloadData()
        
    }
    
    
    deinit {
        /// 移除通知
        NotificationCenter.default.removeObserver(self)
    }
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
        NotificationCenter.default.addObserver(self, selector: #selector(namephoto), name: NSNotification.Name(rawValue:"isTest"), object: nil)
        
        
        
        NotificationCenter.default.addObserver(self, selector: #selector(shenpinamephoto), name: NSNotification.Name(rawValue:"shenpi"), object: nil)
        
        
        NotificationCenter.default.addObserver(self, selector: #selector(tuisongnamephoto), name: NSNotification.Name(rawValue:"tuisong"), object: nil)
        
        
        NotificationCenter.default.addObserver(self, selector: #selector(wentinamephoto), name: NSNotification.Name(rawValue:"wenti"), object: nil)
        
        
        NotificationCenter.default.addObserver(self, selector: #selector(touzifangNotification), name: NSNotification.Name(rawValue:"touzifang"), object: nil)
        
        
        NotificationCenter.default.addObserver(self, selector: #selector(hezuofangNotification), name: NSNotification.Name(rawValue:"hezuofang"), object: nil)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        
        
        
        self.title = "项目录入"
        
        self.view.backgroundColor = UIColor.white
        tableView = UITableView(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: self.view.frame.size.height - 49 - 40), style: .plain )
        tableView.dataSource = self
        tableView.delegate = self
        tableView.separatorInset = UIEdgeInsets.zero
        //        tableView.separatorStyle = .none
        tableView.backgroundColor = bgGrayColor
        tableView.showsHorizontalScrollIndicator = false
        tableView.showsVerticalScrollIndicator = false
        //tableView.contentInset = UIEdgeInsetsMake(-20, 0, 0, 0)//去除表格上放多余的空隙
        //tableView.tableHeaderView = UIView.init()
        tableView.tableFooterView = UIView.init()
        self.view.addSubview(tableView)
        
        
        self.luruButton = UIButton()
        //背景颜色
        self.luruButton.frame = CGRect(x: 10, y: self.view.frame.size.height - 49 - 40 , width: self.view.frame.size.width - 20, height: 40)
        self.luruButton.backgroundColor = UIColor.blue
        self.luruButton.titleLabel?.font = UIFont.systemFont(ofSize: 15)
        self.luruButton.setTitle("录入", for: .normal )
        self.luruButton.layer.cornerRadius = 10
        self.luruButton.layer.masksToBounds = true
        
        self.luruButton.addTarget(self,action:#selector(luruButtonClick), for: .touchUpInside)
        self.view.addSubview(self.luruButton)
        
        
        
        tableView.register(NSClassFromString("LuruTextFirldTableViewCell"), forCellReuseIdentifier: "LuruTextFirldTableViewCell")
        
        
        
        
        tableView.register(NSClassFromString("lianxirenTableViewCell"), forCellReuseIdentifier: "lianxirenTableViewCell")
        
        tableView.register(NSClassFromString("xiangmujinduTableViewCell"), forCellReuseIdentifier: "xiangmujinduTableViewCell")
        
        
        tableView.register(NSClassFromString("banlirenTableViewCell"), forCellReuseIdentifier: "banlirenTableViewCell")
        
        
        
        
        tableView.register(NSClassFromString("PhotoCellTableViewCell"), forCellReuseIdentifier: "PhotoCellTableViewCell")
        
        
        tableView.register(NSClassFromString("PhotoImageViewCell"), forCellReuseIdentifier: "PhotoImageViewCell")
        
        tableView.register(NSClassFromString("xinwenImageViewTableViewCell"), forCellReuseIdentifier: "xinwenImageViewTableViewCell")
        
        
        tableView.register(NSClassFromString("chanpinxiaxianTableViewCell"), forCellReuseIdentifier: "chanpinxiaxianTableViewCell")
        
        
        tableView.register(NSClassFromString("kaigongyishiTableViewCell"), forCellReuseIdentifier: "kaigongyishiTableViewCell")
        
        tableView.register(NSClassFromString("xiangmuPhotoTableViewCell"), forCellReuseIdentifier: "xiangmuPhotoTableViewCell")
        
        
        
        self.loadDate()
        
    }
    func loadDate()  {
        let urlString = "http://wwwqjzsyzcscom.aykj.net.cn/api/datadictionary/list"
        
        let json = "{\"parentCode\":\"\("projectJd")\"}"
    
        print("json====\(json)")
        
        let url = URL(string: urlString)!
        let jsonData = json.data(using: .utf8, allowLossyConversion: false)!
        
        var request = URLRequest(url: url)
        request.httpMethod = HTTPMethod.post.rawValue
        request.setValue("application/json", forHTTPHeaderField: "Content-Type")
        request.httpBody = jsonData
        
        Alamofire.request(request).responseJSON {(response) in
            
            print(response)
         
                    
                    
                    
        }
                
      
    }
    @objc func  luruButtonClick(){
  
        
        let manager = UserDefaults()
        
        
        let token: String? = manager.string(forKey:"tokens")  //根据关键字取值
        
        
        if self.xiangmuString == "在谈" {
            self.xiangmuStrings = "5";
        }else if self.xiangmuString == "签约"{
            self.xiangmuStrings = "4";
        }else if self.xiangmuString == "履约"{
            self.xiangmuStrings = "3";
        }else if self.xiangmuString == "开工"{
            self.xiangmuStrings = "2";
        }else {
            self.xiangmuStrings = "1";
        }
        
        if self.guoneiString == "国内"{
            self.guojia = 1
            
            self.touzifangguojiadizhi = self.guoneitouzidizhiString
        }else{
            self.guojia = 2
            
            self.touzifangguojiadizhi = self.guowaidizhiString
        }
        
        if self.wubaiString == "世界五百强"{
            self.shifouwubaiqingString = "1"
        }else if self.wubaiString == "中国五百强"{
            self.shifouwubaiqingString = "2"
        }else if self.wubaiString == "民营500强"{
            self.shifouwubaiqingString = "3"
        }else if self.wubaiString == "高新技术企业"{
            self.shifouwubaiqingString = "4"
        }else {
            self.shifouwubaiqingString = "0"
        }
        
        if self.shinei == "政府及其部门"{
            self.shineixiangmuhezuofangString = "1"
        }else if self.shinei == "商协会"{
            self.shineixiangmuhezuofangString = "2"
        }else if self.shinei == "中介机构"{
            self.shineixiangmuhezuofangString = "3"
        }else if self.shinei == "企业"{
            self.shineixiangmuhezuofangString = "4"
        }else {
            self.shineixiangmuhezuofangString = "5"
        }
        
        
        if self.tuisong == "推送" {
            self.shifoutuisong = "1"
        }else{
            self.shifoutuisong = "2"
        }
        
       
        if self.banlirenid == nil{
            self.banlirenids = ""
        }else{
            self.banlirenids = self.banlirenid
        }
        
//        let urlString = "http://wwwqjzsyzcscom.aykj.net.cn/api/adminUserCenter/termination/update"
        //项目进度
        if self.xiangmuString == nil {
            self.xiangmuStrings = ""
        }
        //项目名称
        if self.xiangmumingchengString == nil {
            self.xiangmumingchengStrings = ""
        }else{
            self.xiangmumingchengStrings = self.xiangmumingchengString!
        }
        //项目简介
        
        if self.xiangmujianjieString == nil {
            self.xiangmujianjieStrings = ""
        }else{
            self.xiangmujianjieStrings = self.xiangmujianjieString!
        }
        
        //对接情况
        
        if self.duijieqingkuangString == nil {
            self.duijieqingkuangStrings = ""
        }else{
            self.duijieqingkuangStrings = self.duijieqingkuangString!
        }
        
       // "investorName":self.xiangmufangmingziString!, //投资方名称
        if self.xiangmufangmingziString == nil {
            self.xiangmufangmingziStrings = ""
        }else{
            self.xiangmufangmingziStrings = self.xiangmufangmingziString!
        }
//        "investorAddressProvince":"\(self.touzifangshenID!)",//国内省
        if self.touzifangshenID == nil {
          self.touzifangshenIDs = ""
        }else{
            self.touzifangshenIDs = self.touzifangshenID!
        }
//        "investorAddressCity" :"\(self.touzifangshiID!)",//国内市
        if self.touzifangshiID == nil {
          self.touzifangshiIDs = ""
        }else{
            self.touzifangshiIDs = self.touzifangshiID!
        }
//        "investorAddressCountry":"\(self.touzifangxianID!)",//国内县
        if self.touzifangxianID == nil {
            self.touzifangxianIDs = ""
        }else{
            self.touzifangxianIDs = self.touzifangxianID!
        }
//         "outChinaAddress":self.guowaidizhiString!,//国外地址
        if self.guowaidizhiString == nil {
            self.guowaidizhiStrings = ""
        }else{
            self.guowaidizhiStrings = self.guowaidizhiString!
        }
        
        
//        "linkman":self.xiangmufanglianxirenString!,//项目方联系人
        if self.xiangmufanglianxirenString == nil {
            self.xiangmufanglianxirenStrings = ""
        }else{
            self.xiangmufanglianxirenStrings = self.xiangmufanglianxirenString!
        }
//        "telphone":self.xiangmufangdianhuaString!,//项目方联系电话
        
        if self.xiangmufangdianhuaString == nil {
            self.xiangmufangdianhuaStrings = ""
        }else{
            self.xiangmufangdianhuaStrings = self.xiangmufangdianhuaString!
        }
//        "topOfWorld":self.shifouwubaiqingString!,//是否五百强
        
        if self.shifouwubaiqingString == nil {
            self.shifouwubaiqingStrings = ""
        }else{
            self.shifouwubaiqingStrings = self.shifouwubaiqingString!
        }
 
//        "capitalAttractor":self.shineixiangmuhezuofangString!,//项目合作方
        
        if self.shineixiangmuhezuofangString == nil {
            self.shineixiangmuhezuofangStrings = ""
        }else{
            self.shineixiangmuhezuofangStrings = self.shineixiangmuhezuofangString!
        }
        

//        "caName":self.shineixiangmumingchengString!,//项目名称
        
        if self.shineixiangmumingchengString == nil {
            self.shineixiangmumingchengStrings = ""
        }else{
            self.shineixiangmumingchengStrings = self.shineixiangmumingchengString!
        }
//        "unitPropert":self.xingzhi!,//单位性质
        
        if self.xingzhi == nil {
            self.xingzhis = ""
        }else{
            self.xingzhis = self.xingzhi!
        }

//        "unitAddress":self.danweizhidi!,//单位地址
        
        if self.hezuofangshenName == nil {
            self.danweidizhi = ""
        }else{
            self.danweidizhi = self.hezuofangshenName!
        }
 
//        "unitLeader":self.shineidanweifuzerenString!,//单位负责人
        
        
        if self.shineidanweifuzerenString == nil {
            self.shineidanweifuzerenStrings = ""
        }else{
            self.shineidanweifuzerenStrings = self.shineidanweifuzerenString!
        }
//        "linkName":self.shineilianxirenString!,//联系人
        
        if self.shineilianxirenString == nil {
            self.shineilianxirenStrings = ""
        }else{
            self.shineilianxirenStrings = self.shineilianxirenString!
        }
//        "coopePhone":self.shineilianxirendianhuaString!,//联系电话
        
        if self.shineilianxirendianhuaString == nil {
            self.shineilianxirendianhuaStrings = ""
        }else{
            self.shineilianxirendianhuaStrings = self.shineilianxirendianhuaString!
        }
//        "projectReferee":self.shineiyindaorenString!,//项目引荐人
        if self.shineiyindaorenString == nil {
            self.shineiyindaorenStrings = ""
        }else{
            self.shineiyindaorenStrings = self.shineiyindaorenString!
        }
//        "projectRefereeTelphone":self.shineiyindaorendianhuaString!,//引荐人电话
        
        if self.shineiyindaorendianhuaString == nil {
            self.shineiyindaorendianhuaStrings = ""
        }else{
            self.shineiyindaorendianhuaStrings = self.shineiyindaorendianhuaString!
        }
        
        //项目进展过程需要解决问题
//        "questionDesp":self.xiangmuwentimiaoshuString!,//问题描述
        
        if self.xiangmuwentimiaoshuString == nil {
            self.xiangmuwentimiaoshuStrings = ""
        }else{
            self.xiangmuwentimiaoshuStrings = self.xiangmuwentimiaoshuString!
        }
        
//        "projectAreaProvince":self.xiangmushengshixianString!,  //省
        if self.xiangmushengshixianString == nil {
            self.xiangmushengshixianStrings = ""
        }else{
            self.xiangmushengshixianStrings = self.xiangmushengshixianString!
        }
//        "projectAreaCity":self.xiangmushengshixianString!,//市
//        if self.xiangmushengshixianString == nil {
//            self.xiangmushengshixianStrings = ""
//        }else{
//            self.xiangmushengshixianStrings = self.xiangmushengshixianString!
//        }
////        "projectAreaCountry":self.xiangmushengshixianString!,//县
//
//        if self.xiangmushengshixianString == nil {
//            self.xiangmushengshixianStrings = ""
//        }else{
//            self.xiangmushengshixianStrings = self.xiangmushengshixianString!
//        }
//        "departmentName":self.xiangmubumenmingchengString!,//部门名称
        
        if self.xiangmubumenmingchengString == nil {
            self.xiangmubumenmingchengStrings = ""
        }else{
            self.xiangmubumenmingchengStrings = self.xiangmubumenmingchengString!
        }
//        "signTime":self.qianyueStrig!,//签约时间
        
        if self.qianyueStrig == nil {
            self.qianyueStrigs = ""
        }else{
            self.qianyueStrigs = self.qianyueStrig!
        }
//        "agreementAmount":self.xiangmuxieyitouzieString!,//协议投资额
        if self.xiangmuxieyitouzieString == nil {
            self.xiangmuxieyitouzieStrings = ""
        }else{
            self.xiangmuxieyitouzieStrings = self.xiangmuxieyitouzieString!
        }
//        "industryCategoryId":self.chnayeleibieStrig!,//产业类别
//        "高原特色农业和生物资源深加工产业","有色金属深加工和液态金属产业","军民融合现代装备制造产业","精细化工产业","现代商贸物流产业","文化旅游和高原体育产业","教育类项目","医疗卫生类项目","其他产业"
        if self.chnayeleibieStrig == nil {
            self.chnayeleibieStrigs = ""
        }else if self.chnayeleibieStrig == "高原特色农业和生物资源深加工产业" {
            self.chnayeleibieStrigs = "1"
        }else if self.chnayeleibieStrig == "有色金属深加工和液态金属产业" {
            self.chnayeleibieStrigs = "2"
        }else if self.chnayeleibieStrig == "军民融合现代装备制造产业" {
            self.chnayeleibieStrigs = "3"
        }else if self.chnayeleibieStrig == "精细化工产业" {
            self.chnayeleibieStrigs = "4"
        }else if self.chnayeleibieStrig == "现代商贸物流产业" {
            self.chnayeleibieStrigs = "5"
        }else if self.chnayeleibieStrig == "文化旅游和高原体育产业" {
            self.chnayeleibieStrigs = "6"
        }else if self.chnayeleibieStrig == "教育类项目" {
            self.chnayeleibieStrigs = "7"
        }else if self.chnayeleibieStrig == "医疗卫生类项目" {
            self.chnayeleibieStrigs = "8"
        }else{
            self.chnayeleibieStrigs = "9"
        }
//        "projectContent":self.xiangmujianshejibenString!,//项目建设基本内容
        
        if self.xiangmujianshejibenString == nil {
            self.xiangmujianshejibenStrings = ""
        }else{
            self.xiangmujianshejibenStrings = self.xiangmujianshejibenString!
        }
//        "projectBuildAddr":self.xiangmujianshediString!,//项目建设地
        
        if self.xiangmujianshediString == nil {
            self.xiangmujianshediStrings = ""
        }else{
            self.xiangmujianshediStrings = self.xiangmujianshediString!
        }
//        "signPicture":"",//签约照片

//        "newsReport":"",//新闻报道
//        "investmentBook":self.xiangmutouzixieyishuString!,//投资协议书
        
        if self.xiangmutouzixieyishuString == nil {
            self.xiangmutouzixieyishuStrings = ""
        }else{
            self.xiangmutouzixieyishuStrings = self.xiangmutouzixieyishuString!
        }
//        "performTime":self.xiangmulvxingshijianString!,//履约时间
        
        if self.xiangmulvxingshijianString == nil {
            self.xiangmulvxingshijianStrings = ""
        }else{
            self.xiangmulvxingshijianStrings = self.xiangmulvxingshijianString!
        }
//        "existCapital":self.xiangmuleijidaoweizijinString!,//累计到位资金(万元)
        
        if self.xiangmuleijidaoweizijinString == nil {
            self.xiangmuleijidaoweizijinStrings = ""
        }else{
            self.xiangmuleijidaoweizijinStrings = self.xiangmuleijidaoweizijinString!
        }
//        "yearExistCapital":self.xiangmudangniandaoweizijinString!,//当年到位资金(万元)
        
        if self.xiangmudangniandaoweizijinString == nil {
            self.xiangmudangniandaoweizijinStrings = ""
        }else{
            self.xiangmudangniandaoweizijinStrings = self.xiangmudangniandaoweizijinString!
        }
//        "fixedAssetExistCapital":self.xiangmunaruleijidaoweizijinString,//纳入固定资产投资统计累计到位资金(万元)
        if self.xiangmunaruleijidaoweizijinString == nil {
            self.xiangmunaruleijidaoweizijinStrings = ""
        }else{
            self.xiangmunaruleijidaoweizijinStrings = self.xiangmunaruleijidaoweizijinString!
        }
//        "fixedAssetYearExistCapital":self.xiangmunarudangniandaoweizijinString,//纳入固定资产投资统计当年到位资金(万元)
        
        if self.xiangmunarudangniandaoweizijinString == nil {
            self.xiangmunarudangniandaoweizijinStrings = ""
        }else{
            self.xiangmunarudangniandaoweizijinStrings = self.xiangmunarudangniandaoweizijinString!
        }
//        "existCapitalProve":self.xiangmudaoweizijincailiaoString!,//到位资金证明材料(图片)
        
        if self.xiangmudaoweizijincailiaoString == nil {
            self.xiangmudaoweizijincailiaoStrings = ""
        }else{
            self.xiangmudaoweizijincailiaoStrings = self.xiangmudaoweizijincailiaoString!
        }
        
        
        
//        //项目前置手续办理情况
//        "businessRegist":self.gongshangqingkuangStrig!,//工商登记情况
        
        if self.gongshangqingkuangStrig == nil {
            self.gongshangqingkuangStrigs = ""
        }else{
            self.gongshangqingkuangStrigs = self.gongshangqingkuangStrig!
        }
//        "businessRegistRemark":self.gongshangpifuString!,//工商登记情况状态情况
        if self.gongshangpifuString == nil {
            self.gongshangpifuStrings = ""
        }else{
            self.gongshangpifuStrings = self.gongshangpifuString!
        }
//        "projectApprove":self.lixiangshenpiStrig!,//立项审批/备案情况
        if self.lixiangshenpiStrig == nil {
            self.lixiangshenpiStrigs = ""
        }else{
            self.lixiangshenpiStrigs = self.lixiangshenpiStrig!
        }
//        "projectApproveRemark":self.lixiangpifuString!,//立项审批/备案情况状态情况
        
        if self.lixiangpifuString == nil {
            self.lixiangpifuStrings = ""
        }else{
            self.lixiangpifuStrings = self.lixiangpifuString!
        }
//        "environmentApprove":self.huanbaoshenpiStrig!,//环保审批情况
        
        if self.huanbaoshenpiStrig == nil {
            self.huanbaoshenpiStrigs = ""
        }else{
            self.huanbaoshenpiStrigs = self.huanbaoshenpiStrig!
        }
//        "environmentApproveRemark":self.huanbaopifuString!,//环保审批情况状态情况
        
        if self.huanbaopifuString == nil {
            self.huanbaopifuStrings = ""
        }else{
            self.huanbaopifuStrings = self.huanbaopifuString!
        }
//        "landApprove":self.yongdishenpiStrig!,//用地审批情况
        
        if self.yongdishenpiStrig == nil {
            self.yongdishenpiStrigs = ""
        }else{
            self.yongdishenpiStrigs = self.yongdishenpiStrig!
        }
//        "landApproveRemark":self.yongdipifuString!,//用地审批情况状态情况
        
        if self.yongdipifuString == nil {
            self.yongdipifuStrings = ""
        }else{
            self.yongdipifuStrings = self.yongdipifuString!
        }
//        "planApprove":self.guihuashenpiStrig!,//规划审批情况
        
        if self.guihuashenpiStrig == nil {
            self.guihuashenpiStrigs = ""
        }else{
            self.guihuashenpiStrigs = self.guihuashenpiStrig!
        }
//        "planApproveRemark":self.guihuapifuString!,//规划审批情况状态情况
        
        if self.guihuapifuString == nil {
            self.guihuapifuStrings = ""
        }else{
            self.guihuapifuStrings = self.guihuapifuString!
        }
//        "buildApprove":self.jiansheshenpiStrig!,//建设审批情况
        
        if self.jiansheshenpiStrig == nil {
            self.jiansheshenpiStrigs = ""
        }else{
            self.jiansheshenpiStrigs = self.jiansheshenpiStrig!
        }
//        "buildApproveRemark":self.jianshepifuString!,//建设审批情况状态情况
        
        if self.jianshepifuString == nil {
            self.jianshepifuStrings = ""
        }else{
            self.jianshepifuStrings = self.jianshepifuString!
        }
//
//
//        //项目建设进度
//        "completePercent":self.xiangmuwanchengniandujihuaString!,//完成年度投资计划百分比
        
        if self.xiangmuwanchengniandujihuaString == nil {
            self.xiangmuwanchengniandujihuaStrings = ""
        }else{
            self.xiangmuwanchengniandujihuaStrings = self.xiangmuwanchengniandujihuaString!
        }
//        "completeWorkPercent":self.xiangmuwanchengniandushiwujihuaString!,//完成年度实物工程量计划百分比
        
        if self.xiangmuwanchengniandushiwujihuaString == nil {
            self.xiangmuwanchengniandushiwujihuaStrings = ""
        }else{
            self.xiangmuwanchengniandushiwujihuaStrings = self.xiangmuwanchengniandushiwujihuaString!
        }
//        "projectSpeed":self.xiangmuwanchenggongchengString!,//工程进度
        
        if self.xiangmuwanchenggongchengString == nil {
            self.xiangmuwanchenggongchengStrings = ""
        }else{
            self.xiangmuwanchenggongchengStrings = self.xiangmuwanchenggongchengString!
        }
//        "projectAdvPlan":self.xiangmutuijinjihuaString!,//项目推进计划
        
        if self.xiangmutuijinjihuaString == nil {
            self.xiangmutuijinjihuaStrings = ""
        }else{
            self.xiangmutuijinjihuaStrings = self.xiangmutuijinjihuaString!
        }
//        "startTime":self.xiangmukaigongshijianString!,//开工时间
        
        if self.xiangmukaigongshijianString == nil {
            self.xiangmukaigongshijianStrings = ""
        }else{
            self.xiangmukaigongshijianStrings = self.xiangmukaigongshijianString!
        }
//        "startLicence":self.xiangmukaigongxukezhengString!,//开工许可证（施工合同）
        
        if self.xiangmukaigongxukezhengString == nil {
            self.xiangmukaigongxukezhengStrings = ""
        }else{
            self.xiangmukaigongxukezhengStrings = self.xiangmukaigongxukezhengString!
        }
//        "startRite":"",//开工仪式照片
//        "projectRealPhoto":"",//项目进度实景照片
//
//
//        //项目建设内容及投产前y预估效益
//
//        "areaCovered":self.xiangmuzongzhandimianjiString!,//总占地面积(亩)
        if self.xiangmuzongzhandimianjiString == nil {
            self.xiangmuzongzhandimianjiStrings = ""
        }else{
            self.xiangmuzongzhandimianjiStrings = self.xiangmuzongzhandimianjiString!
        }
//        "buildCovered":self.xiangmuzongjianzhumianjiString!,//总建筑面积(万平方米)
        if self.xiangmuzongjianzhumianjiString == nil {
            self.xiangmuzongjianzhumianjiStrings = ""
        }else{
            self.xiangmuzongjianzhumianjiStrings = self.xiangmuzongjianzhumianjiString!
        }
//        "investLevel":self.xiangmutouziqiangduString!,//投资强度(万元/亩)
        if self.xiangmutouziqiangduString == nil {
            self.xiangmutouziqiangduStrings = ""
        }else{
            self.xiangmutouziqiangduStrings = self.xiangmutouziqiangduString!
        }
//        "employNum":self.xiangmujiuyerenshuString!,//就业人数
        if self.xiangmujiuyerenshuString == nil {
            self.xiangmujiuyerenshuStrings = ""
        }else{
            self.xiangmujiuyerenshuStrings = self.xiangmujiuyerenshuString!
        }
//        "outputValue":self.xiangmunianzongchanzhiString!,//年总产值(百万)
        
        if self.xiangmunianzongchanzhiString == nil {
            self.xiangmunianzongchanzhiStrings = ""
        }else{
            self.xiangmunianzongchanzhiStrings = self.xiangmunianzongchanzhiString!
        }
//        "taxTotalVal":self.xiangmunianshangshuifeizongeString!,//年上缴税费总额(百万)
        
        if self.xiangmunianshangshuifeizongeString == nil {
            self.xiangmunianshangshuifeizongeStrings = ""
        }else{
            self.xiangmunianshangshuifeizongeStrings = self.xiangmunianshangshuifeizongeString!
        }
//        "putIntoProductTime":xiangmutouchanshijianString!,//投产时间
        
        if self.xiangmutouchanshijianString == nil {
            self.xiangmutouchanshijianStrings = ""
        }else{
            self.xiangmutouchanshijianStrings = self.xiangmutouchanshijianString!
        }
//        "compAccepReport":"",//竣工验收报告
        
        if self.xiangmujungongyanshouString == nil {
            self.xiangmujungongyanshouStrings = ""
        }else{
            self.xiangmujungongyanshouStrings = self.xiangmujungongyanshouString!
        }
//        "productOfflinePhoto":"",//产品下线照片
//
//
//        //项目投产后实际效益（项目投产后于每年12月填写
//
//        "obtainNum":self.touchanhoujiuyerenshu!,//就业人数
        
        if self.touchanhoujiuyerenshu == nil {
            self.touchanhoujiuyerenshus = ""
        }else{
            self.touchanhoujiuyerenshus = self.touchanhoujiuyerenshu!
        }
//        "ganOutVal":self.touchannianchanzongzhi!,//年产总值
        if self.touchannianchanzongzhi == nil {
            self.touchannianchanzongzhis = ""
        }else{
            self.touchannianchanzongzhis = self.touchannianchanzongzhi!
        }
//        "yearTaxTotal":self.nianshangshuifeizonge!,//年上缴税费总额
        
        if self.nianshangshuifeizonge == nil {
            self.nianshangshuifeizonges = ""
        }else{
            self.nianshangshuifeizonges = self.nianshangshuifeizonge!
        }
//        "createtime":self.gengxinString!,//更新时间
        if self.gengxinString == nil {
            self.gengxinStrings = ""
        }else{
            self.gengxinStrings = self.gengxinString!
        }
//        "tips":self.shifoutuisong!,//是否提醒更新
        

        
        if self.shifoutuisong == nil {
            self.shifoutuisongs = ""
        }else{
            self.shifoutuisongs = self.shifoutuisong!
        }
//
        if self.tuisongrenid == nil{
            self.tuisongrenids = ""
        }else{
            self.tuisongrenids = self.tuisongrenid!
        }
        
        if self.wentirenid == nil{
            self.wentirenids = ""
        }else{
            self.wentirenids = self.wentirenid!
        }
        
//        var Photoimages = [Any]()
//        var Besa64Photoimage = [String]()
//        var Besa64Photoimages = [String]()
        if self.Besa64Photoimage.count == 0{
            self.Besa64Photoimages = [""]
        }else{
            self.Besa64Photoimages = self.Besa64Photoimage
        }
        

//        var xinwenimages = [Any]()
//        var Besa64xinwenimage = [String]()
//        var Besa64xinwenimages = [String]()
        
        if self.Besa64xinwenimage.count == 0{
            self.Besa64xinwenimages = [""]
        }else{
            self.Besa64xinwenimages = self.Besa64xinwenimage
        }

//        var chanpinimages = [Any]()
//        var Besa64chanpinimage = [String]()
//        var Besa64chanpinimages = [String]()
        
        if self.Besa64chanpinimage.count == 0{
            self.Besa64chanpinimages = [""]
        }else{
            self.Besa64chanpinimages = self.Besa64chanpinimage
        }

//        var kaigongimages = [Any]()
//        var Besa64kaigongimage = [String]()
//        var Besa64kaigongimages = [String]()
        if self.Besa64kaigongimage.count == 0{
            self.Besa64kaigongimages = [""]
        }else{
            self.Besa64kaigongimages = self.Besa64kaigongimage
        }

//        var xiangmuPhotoimages = [Any]()
//        var Besa64xiangmuPhotoimage = [String]()
//        var Besa64xiangmuPhotoimages = [String]()
        
        if self.Besa64xiangmuPhotoimage.count == 0{
            self.Besa64xiangmuPhotoimages = [""]
        }else{
            self.Besa64xiangmuPhotoimages = self.Besa64xiangmuPhotoimage
        }

 
        
        let someDict : [String:Any] =
            
            
            ["projectStage":self.xiangmuStrings!,    // 项目进度  第一区
            "projectName":self.xiangmumingchengStrings!, //项目名称
            "projectIntro":self.xiangmujianjieStrings!,//项目简介
            "buttSituation":self.duijieqingkuangStrings!,//对接情况
                
                
                
                
            "investorName":self.xiangmufangmingziStrings!, //投资方名称  第二区
            "inChina": self.guojia!,//是否国内
            "investorAddressProvince":self.touzifangshenIDs!,//国内省
            "investorAddressCity" :self.touzifangshiIDs!,//国内市
            "investorAddressCountry":self.touzifangxianIDs!,//国内县
            "outChinaAddress":self.guowaidizhiStrings!,//国外地址
//            "linkmans":self.xiangmufanglianxirenStrings!,//项目方联系人
//            "telphones":self.xiangmufangdianhuaStrings!,//项目方联系电话
            "topOfWorld":self.shifouwubaiqingStrings!,//是否五百强
                
                
                
                
                
            "capitalAttractor":self.shineixiangmuhezuofangStrings!,//项目合作方  第三区
            "unitName":self.shineixiangmumingchengStrings!,//单位名称
            "unitPropert":self.xingzhis!,//单位性质
            "unitAddress":self.danweidizhi!,//单位地址
            "unitLeader":self.shineidanweifuzerenStrings!,//单位负责人
            "linkName":self.shineilianxirenStrings!,//联系人
            "coopePhone":self.shineilianxirendianhuaStrings!,//联系电话
            "projectReferee":self.shineiyindaorenStrings!,//项目引荐人
            "projectRefereeTelphone":self.shineiyindaorendianhuaStrings!,//引荐人电话
            
            
            // 项目进展过程需要解决问题
            "questionDesp":self.xiangmuwentimiaoshuStrings!,//问题描述
            "projectAreaProvince":self.xiangmushengshixianStrings!,  //省
//            "projectAreaCity":self.xiangmushengshixianStrings!,//市
//            "projectAreaCountry":self.xiangmushengshixianStrings!,//县
            "departmentName":self.xiangmubumenmingchengStrings!,//部门名称
            "signTime":self.qianyueStrigs!,//签约时间
            "agreementAmount":self.xiangmuxieyitouzieStrings!,//协议投资额
            "industryCategoryId":self.chnayeleibieStrigs!,//产业类别
            "projectContent":self.xiangmujianshejibenStrings!,//项目建设基本内容
            "projectBuildAddr":self.xiangmujianshediStrings!,//项目建设地
//            "signPicture":"",//签约照片
           
        
            "performTime":self.xiangmulvxingshijianStrings!,//履约时间
            "existCapital":self.xiangmuleijidaoweizijinStrings!,//累计到位资金(万元)
            "yearExistCapital":self.xiangmudangniandaoweizijinStrings!,//当年到位资金(万元)
            "fixedAssetExistCapital":self.xiangmunaruleijidaoweizijinStrings!,//纳入固定资产投资统计累计到位资金(万元)
            "fixedAssetYearExistCapital":self.xiangmunarudangniandaoweizijinStrings!,//纳入固定资产投资统计当年到位资金(万元)
//            "existCapitalProve":self.xiangmudaoweizijincailiaoStrings!,//到位资金证明材料(图片)
            
            
            
            
            //项目前置手续办理情况
            "businessRegist":self.gongshangqingkuangStrigs!,//工商登记情况
            "businessRegistRemark":self.gongshangpifuStrings!,//工商登记情况状态情况
            "projectApprove":self.lixiangshenpiStrigs!,//立项审批/备案情况
            "projectApproveRemark":self.lixiangpifuStrings!,//立项审批/备案情况状态情况
            "environmentApprove":self.huanbaoshenpiStrigs!,//环保审批情况
            "environmentApproveRemark":self.huanbaopifuStrings!,//环保审批情况状态情况
            "landApprove":self.yongdishenpiStrigs!,//用地审批情况
            "landApproveRemark":self.yongdipifuStrings!,//用地审批情况状态情况
            "planApprove":self.guihuashenpiStrigs!,//规划审批情况
            "planApproveRemark":self.guihuapifuStrings!,//规划审批情况状态情况
            "buildApprove":self.jiansheshenpiStrigs!,//建设审批情况
            "buildApproveRemark":self.jianshepifuStrings!,//建设审批情况状态情况
            
            
            //项目建设进度
            "completePercent":self.xiangmuwanchengniandujihuaStrings!,//完成年度投资计划百分比
            "completeWorkPercent":self.xiangmuwanchengniandushiwujihuaStrings!,//完成年度实物工程量计划百分比
            "projectSpeed":self.xiangmuwanchenggongchengStrings!,//工程进度
            "projectAdvPlan":self.xiangmutuijinjihuaStrings!,//项目推进计划
            "startTime":self.xiangmukaigongshijianStrings!,//开工时间
//            "startLicence":self.xiangmukaigongxukezhengStrings!,//开工许可证（施工合同）
//            "startRite":"",//开工仪式照片
//            "projectRealPhoto":"",//项目进度实景照片
            
            
            //项目建设内容及投产前y预估效益
            
            "areaCovered":self.xiangmuzongzhandimianjiStrings!,//总占地面积(亩)
            "buildCovered":self.xiangmuzongjianzhumianjiStrings!,//总建筑面积(万平方米)
            "investLevel":self.xiangmutouziqiangduStrings!,//投资强度(万元/亩)
            "employNum":self.xiangmujiuyerenshuStrings!,//就业人数
            "outputValue":self.xiangmunianzongchanzhiStrings!,//年总产值(百万)
            "taxTotalVal":self.xiangmunianshangshuifeizongeStrings!,//年上缴税费总额(百万)
            "putIntoProductTime":self.xiangmutouchanshijianStrings!,//投产时间
//            "compAccepReport":self.xiangmujungongyanshouStrings!,//竣工验收报告
//            "productOfflinePhoto":"",//产品下线照片
            
            
            //项目投产后实际效益（项目投产后于每年12月填写
            
            "obtainNum":self.touchanhoujiuyerenshus!,//就业人数
            "ganOutVal":self.touchannianchanzongzhis!,//年产总值
            "yearTaxTotal":self.nianshangshuifeizonges!,//年上缴税费总额
            "createtime":"2019-01-28",//更新时间self.gengxinStrings!
//            "tips":self.shifoutuisongs!,//是否提醒更新
            

            
        ]
        
        
    
   

        

        
        let json : [String:Any] = ["assignee":self.banlirenids!,    //办理人
            "propMove": self.shifoutuisong!,       //是否推送    1：推送    2：不推送
            "relPushMan":self.tuisongrenids! ,       //推送人
            "questionAssignee":self.wentirenids! ,   //问题单办理人    问题单选择省，市时需要带着个参数
            "shengpiAssignee": self.shenpirenid! ,  //审批人
            
            
            
            
            "signPicture": "[]",        //签约照片self.Besa64Photoimages签约图片\(self.Besa64Photoimages)
            "newsReport": "[]",        //新闻报道self.Besa64xinwenimages\(self.Besa64xinwenimages)
            "existCapitalProve":"[]" ,   //到位资金证明材料
            "businessRegistPic":"[]"  ,  //工商登记情况图片
            "projectApprovePic":"[]"   , //立项审批/备案情况图片
            "environmentApprovePic":"[]"  ,     //环保审批情况图片
            "landApprovePic":"[]",             //用地审批情况图片
            "planApprovePic":"[]",            //规划审批情况图片
            "buildApprovePic":"[]",          //建设审批情况图片
            "startRite":"[]",  //开工仪式照片self.Besa64kaigongimages\(self.Besa64kaigongimages)
            "projectRealPhoto":"[]",            //项目进度实景照片\(self.Besa64xiangmuPhotoimages)
            
            "productOfflinePhoto":"[]",           //产品下线照片\(self.Besa64chanpinimages)
            
            "startLicence":"[]",            //投资协议书
            
            
            "investmentBook":"[]",//开工许可证(施工合同)
            
            "compAccepReport":"[]",//竣工验收报告
            
            
            "token": token!,
            
            
            "linkmans":self.xiangmufanglianxirenStrings!,//
            "telphones":self.xiangmufangdianhuaStrings!,//
            
            "informationRecord":someDict
        ]
         print("someDict====\(someDict)")

        let jsons = self.getJSONStringFromDictionary(dictionary: json as NSDictionary)
        
         print("jsons====\(jsons)")
       let jsonData = jsons.data(using: .utf8, allowLossyConversion: false)!
        
   
    
        
        let urlString = "http://wwwqjzsyzcscom.aykj.net.cn/api/adminUserCenter/termination/update"

        
        let url = URL(string: urlString)!


        var request = URLRequest(url: url)
        request.httpMethod = HTTPMethod.post.rawValue
        request.setValue("application/json", forHTTPHeaderField: "Content-Type")
        request.httpBody = jsonData
        

        
  

        Alamofire.request(request).responseJSON {(response) in

            print("response====\(response)")


            if response.result.isSuccess {

                let json = JSON(response.data!)
                let array = json["message"].string


                print("array====\(array!)")


            }else{

            }

        }
        
        
        
        
   

      

      
        
    }
    func getJSONStringFromDictionary(dictionary:NSDictionary) -> String {
        if (!JSONSerialization.isValidJSONObject(dictionary)) {
            print("无法解析出JSONString")
            return ""
        }
        let data : NSData! = try? JSONSerialization.data(withJSONObject: dictionary, options: []) as NSData!
        let JSONString = NSString(data:data as Data,encoding: String.Encoding.utf8.rawValue)
        return JSONString! as String
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
}

extension LuruViewController: UITableViewDelegate, UITableViewDataSource,UITextFieldDelegate ,loadingDeleagte ,xinwenDeleagte,chanpinxiaxianDeleagte,kaigongyishiDeleagte,xiangmuPhotoDeleagte{
    func kaigongyishiDeleagte(text: Array<Any>, indexs: NSInteger) {
        let previewVC = ImagePreviewVC(images: text as! [UIImage], index: indexs)
        
        self.present(previewVC, animated: true, completion: nil)
    }
    
    func xiangmuPhotoDeleagte(text: Array<Any>, indexs: NSInteger) {
        let previewVC = ImagePreviewVC(images: text as! [UIImage], index: indexs)
        
        self.present(previewVC, animated: true, completion: nil)
    }
    
    //产品线下
    func chanpinxiaxianDeleagte(text: Array<Any>, indexs: NSInteger) {
        let previewVC = ImagePreviewVC(images: text as! [UIImage], index: indexs)
        
        self.present(previewVC, animated: true, completion: nil)
    }
    
    func xinwenDeleagte(text: Array<Any>, indexs: NSInteger) {
        
        let previewVC = ImagePreviewVC(images: text as! [UIImage], index: indexs)
        
        
        
        self.present(previewVC, animated: true, completion: nil)
    }
    
    func didLoading(text: Array<Any>, indexs: NSInteger) {
        print("1111====\(text),2222===\(indexs)")
  
      
        //进入图片全屏展示
        let previewVC = ImagePreviewVC(images: text as! [UIImage], index: indexs)
        
        
        
        self.present(previewVC, animated: true, completion: nil)
    }
    
    
    
    
    
    func numberOfSections(in tableView: UITableView) -> Int {
        return 12
    }
    
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        
        if section == 0 {
            
            return  self.nameArray.count
            
        }
        else if section  == 1 {
            
            return self.xiangmutouzifangArray.count
            
        }else if section == 2 {
            
            return self.shineihezuofangArray.count
  
        }else if section == 3 {
            
            return self.jinzhanArray.count
            
        }else if section == 4 {
            
            return self.qingkuangArray.count
            
        }else if section == 5 {
            
            return self.xiangmujiansheArray.count
   
            
        }else if section == 6 {
            
            return self.yuguxiaoyiArray.count
            
        }else if section == 7 {
            
            return self.shijixiaoyiArray.count
        
        }else if section == 8 {
            return 1
            
        }else  {
            
            return 1
            
        }
    }
    
    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        
        if indexPath.section == 1{
            if indexPath.row == 3{
                return 100
            }else{
                return 40
            }
        }else if indexPath.section == 3{
            if indexPath.row == 9{
                if self.Photoimages.count == 0{
                    return 0
                }else if self.Photoimages.count <= 3{
                    return 70
                }else if self.Photoimages.count <= 6{
                    return 140
                }else{
                    return 210
                }
            }else if indexPath.row == 11{
                if self.xinwenimages.count == 0{
                    return 0
                }else if self.xinwenimages.count <= 3{
                    return 70
                }else if self.xinwenimages.count <= 6{
                    return 140
                }else{
                    return 210
                }
            }else{
                return 40
            }
        }else if indexPath.section == 6{
            if indexPath.row == 9 {
                if self.chanpinimages.count == 0{
                    return 0
                }else if self.chanpinimages.count <= 3{
                    return 70
                }else if self.chanpinimages.count <= 6{
                    return 140
                }else{
                    return 210
                }
            }else{
                return 40
            }
            
        }else if indexPath.section == 5{
            if indexPath.row == 7{
                if self.kaigongimages.count == 0{
                    return 0
                }else if self.kaigongimages.count <= 3{
                    return 70
                }else if self.kaigongimages.count <= 6{
                    return 140
                }else{
                    return 210
                }
            
            }else if indexPath.row == 9{
                if self.xiangmuPhotoimages.count == 0{
                    return 0
                }else if self.xiangmuPhotoimages.count <= 3{
                    return 70
                }else if self.xiangmuPhotoimages.count <= 6{
                    return 140
                }else{
                    return 210
                }
            }else{
                return 40
            }
            
        }else if indexPath.section == 8{
            if self.xiangmuString == "投产"
            {
                return 0
            }else
            {
                return 60
            }
        }else if indexPath.section == 9{
             return 60
        }else if indexPath.section == 10{
        
            if self.tuisong == nil || self.tuisong == "不推送"
            {
            return 0
            }else
            {
            return 60
            }
        }else if indexPath.section == 11{
            
            if self.xiangmushengshixianString == nil
            {
                return 0
            }else
            {
                return 60
            }
        }
        
        
        else{
            return 40
        }
        
        


    }
    
    
    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
     
        if section == 0 {
            return 0
        }
        
        if section == 10 {
            if self.tuisong == nil || self.tuisong == "不推送"{
                return 0
            }else{
                return 40
            }
        }
        if section == 11 {
            if self.xiangmushengshixianString == nil {
                return 0
            }else{
                return 40
            }
        }
        
        if section == 8 {
            if self.xiangmuString == "投产"{
                return 0
            }else{
                return 40
            }
        }
        
       
        
       return 40

    }
    
    //返回分区头部视图
    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        
      
        
        if section  == 1 {
     
            
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            
            let titleLabel = UILabel()
            titleLabel.text = "项目投资方"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
           titleLabel.frame = CGRect(x: 10, y: 10, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
        }else if section == 2 {
            
          
            
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "市内合作方"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
           titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
        }else if section == 3 {
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "项目进展过程中需要解决的问题"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
      
        }else if section == 4 {
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "项目前置手续办理情况"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
        
        }else if section == 5 {
      
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "项目建设进度"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
             titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
            
        }else if section == 6 {
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "项目建设内容及投产前预估效益"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
             titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
   
        }else if section == 7 {

            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "投产后实际效益(投产后于每年12月填写)"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
            
        }else if section == 8 {
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "办理人"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
      
            
        }else  if section == 9{
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "审批人"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
             titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
       
            
        }else  if section == 10{
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "推送人"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            
            return headerView
            
            
        }
        
        else{

            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "问题单办理人"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
 
            return headerView
       
        }
        
        
    }
    @objc func xiangmushengshixianButtonClick(){
        CGXPickerView.showStringPicker(withTitle: "选择省市县", dataSource: ["省","市","县"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.xiangmushengshixianString = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 1, section: 3)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        
            
            print(selectRow!)
            
        }
    }
    
    @objc func jinduButtonClick() {
        
        print("点击~~~~~")

        
        CGXPickerView.showStringPicker(withTitle: "项目进度", dataSource: ["在谈","签约","履约","开工","投产"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.xiangmuString = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 0, section: 0)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            self.tableView.reloadData()
            
            print(selectRow!)
            
        }
    }
     @objc func jinduButtonClick1() {
  
        
        print("点击~~~~~")
        
        
        CGXPickerView.showStringPicker(withTitle: "是否国内", dataSource: ["国内","国外",], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.guoneiString = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 1, section: 1)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            
            
            let indexPaths: IndexPath = IndexPath.init(row: 2, section: 1)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
    }
    @objc func shineiButtonClick(){
        
        CGXPickerView.showStringPicker(withTitle: "项目合作方", dataSource: ["政府及其部门","商协会","中介机构","企业","个人"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.shinei = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 0, section: 2)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            print(selectRow!)
            
        }
        
        
        
    }
    //单位性质
    @objc func xingzhiButtonClick(){
        
        CGXPickerView.showStringPicker(withTitle: "单位性质", dataSource: ["政府机关","事业","央企","省属企业","地市州企业","民企","混合制企业","个人"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.xingzhi = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 2, section: 2)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    //单位地址
    @objc func danweizhidiButtonClick(){
        
        let touzifangshenVC =  touzifangshenViewController()
        
        touzifangshenVC.hezuofang = "合作方"
        
        self.navigationController?.pushViewController(touzifangshenVC , animated: true)

        

    }
    //手续
    @objc func shouxuButtonClick(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.gongshangqingkuangStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 0, section: 4)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            let indexPaths: IndexPath = IndexPath.init(row: 1, section: 4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    
    //立项审批
    @objc func shouxuButtonClick1(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.lixiangshenpiStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 2, section: 4)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            
            let indexPaths: IndexPath = IndexPath.init(row: 3, section: 4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    //环保审批
    @objc func shouxuButtonClick2(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.huanbaoshenpiStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 4, section: 4)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            let indexPaths: IndexPath = IndexPath.init(row: 5, section: 4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    
    
    //用地审批
    @objc func shouxuButtonClick3(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.yongdishenpiStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 6, section: 4)
            
            
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            
            let indexPaths: IndexPath = IndexPath.init(row: 7, section:4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    
    //规划审批
    @objc func shouxuButtonClick4(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.guihuashenpiStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 8, section: 4)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            let indexPaths: IndexPath = IndexPath.init(row: 9, section: 4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    //建设审批
    @objc func shouxuButtonClick5(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.jiansheshenpiStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 10, section: 4)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            let indexPaths: IndexPath = IndexPath.init(row: 11, section: 4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    
    //产业类别
    @objc func chanyeButtonClick(){
        
        
        CGXPickerView.showStringPicker(withTitle: "产业类别", dataSource: ["高原特色农业和生物资源深加工产业","有色金属深加工和液态金属产业","军民融合现代装备制造产业","精细化工产业","现代商贸物流产业","文化旅游和高原体育产业","教育类项目","医疗卫生类项目","其他产业"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.chnayeleibieStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 5, section: 3)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            print(selectRow!)
            
        }
        
        
    }
    
   
    
    @objc func gengxinshijianButtonClick(){
        let now = Date()
        
        // 创建一个日期格式器
        let dformatter = DateFormatter()
        dformatter.dateFormat = "yyyy年MM月dd日 HH:mm:ss"
        print("当前日期时间：\(dformatter.string(from: now))")
        
        
        let dateString = dformatter.string(from: now)
        
        
        CGXPickerView.showDatePicker(withTitle: "选择时间", dateType: UIDatePickerMode.date, defaultSelValue: nil, minDateStr: "1900-01-01 00:00:00", maxDateStr: dateString, isAutoSelect: true, manager: nil) { (selectValue) in
            print("--------\(selectValue!)")
            
            
            self.gengxinString = selectValue!
            
            let indexPath: IndexPath = IndexPath.init(row: 3, section: 7)

            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        }
    }
    @objc func tuisongButtonClick(){
        CGXPickerView.showStringPicker(withTitle: "是否推送", dataSource: ["推送","不推送"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            
            self.tuisong = selectValue as? String
            
//            let indexPath: IndexPath = IndexPath.init(row: 4, section: 7)

            self.tableView.reloadData()
            
        }
    }
    
    
    @objc func wubaiButtonClick(){
        
        CGXPickerView.showStringPicker(withTitle: "是否500强", dataSource: ["世界500强","中国500强","民营500强","高新技术企业","否"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.wubaiString = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 4, section: 1)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
        }
    }
    @objc func  kaigongshijianButtonClick(){
        //获取当前时间
        let now = Date()
        
        // 创建一个日期格式器
        let dformatter = DateFormatter()
        dformatter.dateFormat = "yyyy年MM月dd日 HH:mm:ss"
        print("当前日期时间：\(dformatter.string(from: now))")
        
        
        let dateString = dformatter.string(from: now)
        
        
        CGXPickerView.showDatePicker(withTitle: "选择时间", dateType: UIDatePickerMode.date, defaultSelValue: nil, minDateStr: "1900-01-01 00:00:00", maxDateStr: dateString, isAutoSelect: true, manager: nil) { (selectValue) in
            print("--------\(selectValue!)")
            
            
            self.xiangmukaigongshijianString = selectValue!
            
            let indexPath: IndexPath = IndexPath.init(row: 4, section: 5)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        }
    }
    @objc func  lvxingshijianButtonClick(){
        //获取当前时间
        let now = Date()
        
        // 创建一个日期格式器
        let dformatter = DateFormatter()
        dformatter.dateFormat = "yyyy年MM月dd日 HH:mm:ss"
        print("当前日期时间：\(dformatter.string(from: now))")
        
        
        let dateString = dformatter.string(from: now)
        
        
        CGXPickerView.showDatePicker(withTitle: "选择时间", dateType: UIDatePickerMode.date, defaultSelValue: nil, minDateStr: "1900-01-01 00:00:00", maxDateStr: dateString, isAutoSelect: true, manager: nil) { (selectValue) in
            print("--------\(selectValue!)")
            
            
            self.xiangmulvxingshijianString = selectValue!
            
            let indexPath: IndexPath = IndexPath.init(row: 13, section: 3)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        }
    }
    @objc func touchanshijianButtonClick(){
        //获取当前时间
        let now = Date()
        
        // 创建一个日期格式器
        let dformatter = DateFormatter()
        dformatter.dateFormat = "yyyy年MM月dd日 HH:mm:ss"
        print("当前日期时间：\(dformatter.string(from: now))")
        
        
        let dateString = dformatter.string(from: now)
        
        
        CGXPickerView.showDatePicker(withTitle: "选择时间", dateType: UIDatePickerMode.date, defaultSelValue: nil, minDateStr: "1900-01-01 00:00:00", maxDateStr: dateString, isAutoSelect: true, manager: nil) { (selectValue) in
            print("--------\(selectValue!)")
            
            
            self.xiangmutouchanshijianString = selectValue!
            
            let indexPath: IndexPath = IndexPath.init(row: 6, section: 6)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        }
    }
    @objc func  qianyueshijianButtonClick(){
        //获取当前时间
        let now = Date()
        
        // 创建一个日期格式器
        let dformatter = DateFormatter()
        dformatter.dateFormat = "yyyy年MM月dd日 HH:mm:ss"
        print("当前日期时间：\(dformatter.string(from: now))")
        
        
        let dateString = dformatter.string(from: now)
        
        
        CGXPickerView.showDatePicker(withTitle: "选择时间", dateType: UIDatePickerMode.date, defaultSelValue: nil, minDateStr: "1900-01-01 00:00:00", maxDateStr: dateString, isAutoSelect: true, manager: nil) { (selectValue) in
            print("--------\(selectValue!)")
            
            
            self.qianyueStrig = selectValue!
            
            let indexPath: IndexPath = IndexPath.init(row: 3, section: 3)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        }
    }
   
    @objc func touzifangButtonClick(){
        
        
        
        
        
                let touzifangshenVC =  touzifangshenViewController()
                touzifangshenVC.hezuofang = "投资方"
                self.navigationController?.pushViewController(touzifangshenVC , animated: true)
        
//        CGXPickerView.showAddressPicker(withTitle: "请选择城市", defaultSelected: [4,0,0], isAutoSelect: true, manager: nil) { (selectAddressArr , selectAddressRow) in
//
//            self.guoneitouzidizhiString = "\(selectAddressArr![0])\(selectAddressArr![1])\(selectAddressArr![2])"
//            print("1111=======\( self.guoneitouzidizhiString!)")
//
//
//
//            let indexPath: IndexPath = IndexPath.init(row: 2, section: 1)
//
//            self.tableView.reloadRows(at: [indexPath], with: .fade)
//
//
//
//        }
    }
    
    @objc func gongchengjiduButtonClick(){
        CGXPickerView.showStringPicker(withTitle: "工程进度", dataSource: ["征地拆迁阶段","三通一平阶段","基础工程建设阶段","主体工程建设阶段","设备安装调试阶段"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.xiangmuwanchenggongchengString = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 2, section: 5)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
        }
    }
    

    /**********************代理*/

    
    func textFieldDidEndEditing(_ textField: UITextField) {
        print("已经结束编辑")
        
                if textField.tag == 1001{
                    
                    self.xiangmumingchengString = textField.text
                }else if textField.tag == 1002{
                    self.xiangmujianjieString = textField.text
                }else if textField.tag == 1003{
                    self.duijieqingkuangString = textField.text
                    
                }else if textField.tag == 1010{
                    self.xiangmufangmingziString = textField.text
                }else if textField.tag == 1012{
                    self.guowaidizhiString = textField.text
                }
                
                
                else if textField.tag == 1013{
                    self.xiangmufanglianxirenString = textField.text
                }else if textField.tag == 1014{
                    self.xiangmufangdianhuaString = textField.text
                }else if textField.tag == 1021{
                    self.shineixiangmumingchengString = textField.text
                }else if textField.tag == 1024{
                    self.shineidanweifuzerenString = textField.text
                }else if textField.tag == 1025{
                    self.shineilianxirenString = textField.text
                }else if textField.tag == 1026{
                    self.shineilianxirendianhuaString = textField.text
                }else if textField.tag == 1027{
                    self.shineiyindaorenString = textField.text
                }else if textField.tag == 1028{
                    self.shineiyindaorendianhuaString = textField.text
                }else if textField.tag == 1030{
                    self.xiangmuwentimiaoshuString = textField.text
                }else if textField.tag == 1032{
                    self.xiangmubumenmingchengString = textField.text
                }else if textField.tag == 1034{
                    self.xiangmuxieyitouzieString = textField.text
                }else if textField.tag == 1036{
                    self.xiangmujianshejibenString = textField.text
                }else if textField.tag == 1037{
                    self.xiangmujianshediString = textField.text
                }else if textField.tag == 10312{
                    self.xiangmutouzixieyishuString = textField.text
                    
                }
//                else if textField.tag == 10313{
//                    self.xiangmulvxingshijianString = textField.text
//                }
                else if textField.tag == 10314{
                    self.xiangmuleijidaoweizijinString = textField.text
                }else if textField.tag == 10315{
                    self.xiangmudangniandaoweizijinString = textField.text
                }else if textField.tag == 10316{
                    self.xiangmunaruleijidaoweizijinString = textField.text
                }else if textField.tag == 10317{
                    self.xiangmunarudangniandaoweizijinString = textField.text
                }else if textField.tag == 10318{
                    self.xiangmudaoweizijincailiaoString = textField.text
                }else if textField.tag == 1041{
                    self.gongshangpifuString = textField.text
                }else if textField.tag == 1043{
                    self.lixiangpifuString = textField.text
                }else if textField.tag == 1045{
                    self.huanbaopifuString = textField.text
                }else if textField.tag == 1047{
                    self.yongdipifuString = textField.text
                }else if textField.tag == 1049{
                    self.guihuapifuString = textField.text
                }else if textField.tag == 10410{
                    self.jianshepifuString = textField.text
                }else if textField.tag == 1050{
                    self.xiangmuwanchengniandujihuaString = textField.text
                }else if textField.tag == 1051{
                    self.xiangmuwanchengniandushiwujihuaString = textField.text
                }else if textField.tag == 1053{
                    self.xiangmutuijinjihuaString = textField.text
                }else if textField.tag == 1055{
                    self.xiangmukaigongxukezhengString = textField.text
                }else if textField.tag == 1060{
                    self.xiangmuzongzhandimianjiString = textField.text
                }else if textField.tag == 1061{
                    self.xiangmuzongjianzhumianjiString = textField.text
                }else if textField.tag == 1062{
                    self.xiangmutouziqiangduString = textField.text
                }else if textField.tag == 1063{
                    self.xiangmujiuyerenshuString = textField.text
                }else if textField.tag == 1064{
                    self.xiangmunianzongchanzhiString = textField.text
                }else if textField.tag == 1065{
                    self.xiangmunianshangshuifeizongeString = textField.text
                }else if textField.tag == 1067{
                    self.xiangmujungongyanshouString = textField.text
                }else if textField.tag == 1070{
                    self.touchanhoujiuyerenshu = textField.text
                }else if textField.tag == 1071{
                    self.touchannianchanzongzhi = textField.text
                }else if textField.tag == 1072{
                    self.nianshangshuifeizonge = textField.text
                }
 
    }
    

    

  /**********************单元格*/
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {

        
        //项目进度
        if indexPath.section == 0 {

            
            if indexPath.row == 0 {
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.nameArray[indexPath.row]
                if self.xiangmuString == nil {
                     cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmuString
                }
               
                cell.jinduButton.addTarget(self, action: #selector(jinduButtonClick), for: .touchUpInside)
            
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
            }
            else if indexPath.row == 1 {
                
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.nameArray[indexPath.row]
               
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1001
                
          
                
                
                if self.xiangmumingchengString == nil{
                     cell.titleTextField.placeholder = "请输入项目名称"
                }else{
                     cell.titleTextField.text = self.xiangmumingchengString
                }
                

               
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }else if indexPath.row == 2 {
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.nameArray[indexPath.row]
               
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1002
                if self.xiangmujianjieString == nil{
                     cell.titleTextField.placeholder = "请输入项目简介"
                }else{
                    cell.titleTextField.text = self.xiangmujianjieString
                }
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }else{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.nameArray[indexPath.row]
             
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1003
                if self.duijieqingkuangString == nil{
                      cell.titleTextField.placeholder = "请输入对接情况"
                }else{
                    cell.titleTextField.text = self.duijieqingkuangString
                }
                
                
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }
            
            
        
            //项目投资方
        }
        else if indexPath.section == 1{
            

            
            if indexPath.row == 0{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.xiangmutouzifangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
        
               
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1010
                if self.xiangmufangmingziString == nil{
                     cell.titleTextField.placeholder = "请输入姓名"
                }else{
                    cell.titleTextField.text = self.xiangmufangmingziString
                }
                
                
                
                return cell
                
            }else if indexPath.row == 1 {
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.xiangmutouzifangArray[indexPath.row]
                if self.guoneiString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.guoneiString
                }
                
                cell.jinduButton.addTarget(self, action: #selector(jinduButtonClick1), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
               
            }else if indexPath.row == 2 {
              
 
                
                if self.guoneiString == nil || self.guoneiString == "国内"{

                    
                    let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                    cell.titleLbel.text = "国内投资方地址"
                    if self.touzifangshenName == nil {
                        cell.nameLbel.text = ""
                    }else{
                        cell.nameLbel.text = "\(self.touzifangshenName!)\(self.touzifangshiName!)\(self.touzifangxianName!)"
                    }
                    
                    cell.jinduButton.addTarget(self, action: #selector(touzifangButtonClick), for: .touchUpInside)
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    return cell
                    
                    
                }
                else{
                    
                    let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                    cell.titleLbel.text = "国外投资方地址"
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                  
                    
                    cell.titleTextField.tag = 1012
                    cell.titleTextField.delegate = self
                    
                    
                    if self.guowaidizhiString == nil{
                        cell.titleTextField.placeholder = "请输入地址"
                    }else{
                        cell.titleTextField.text = self.guowaidizhiString
                    }
                    
                    
                   return cell
                }

       
               
            }else if indexPath.row == 3{
                let cell = lianxirenTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "lianxirenTableViewCell")
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                cell.nameTextField.delegate = self
                cell.nameTextField.tag = 1013
                cell.phoneTextField.delegate = self
                cell.phoneTextField.tag = 1014
                if self.xiangmufanglianxirenString == nil{
                    cell.nameTextField.placeholder = "请输入姓名"
                }else{
                    cell.nameTextField.text = self.xiangmufanglianxirenString
                }
                
                if self.xiangmufangdianhuaString == nil{
                    cell.phoneTextField.placeholder = "请输入手机号"
                }else{
                    cell.phoneTextField.text = self.xiangmufangdianhuaString
                }
                
                
              
                return cell
            }else{
                
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = "是否500强"
                if self.wubaiString  == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.wubaiString
                }
                
                cell.jinduButton.addTarget(self, action: #selector(wubaiButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                

            }
            
            
            //2222222222222222222222222222市内合作方
        }
        else if indexPath.section == 2{
            

            
            
            if indexPath.row == 0{
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                if self.shinei == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.shinei
                }
                
                cell.jinduButton.addTarget(self, action: #selector(shineiButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
            }
            else if  indexPath.row == 1{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
               
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1021
                if self.shineixiangmumingchengString == nil{
                    cell.titleTextField.placeholder = "请输入项目名称"
                }else{
                    cell.titleTextField.text = self.shineixiangmumingchengString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }
            else if  indexPath.row == 2{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                if self.xingzhi == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xingzhi
                }
                
                cell.jinduButton.addTarget(self, action: #selector(xingzhiButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }
            else if  indexPath.row == 3{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                if self.hezuofangshenName == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.hezuofangshenName!
                }
                
                cell.jinduButton.addTarget(self, action: #selector(danweizhidiButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }
            else if  indexPath.row == 4{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1024
                if self.shineidanweifuzerenString == nil{
                    cell.titleTextField.placeholder = "请输入姓名"
                }else{
                    cell.titleTextField.text = self.shineidanweifuzerenString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else if  indexPath.row == 5{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1025
                if self.shineilianxirenString == nil{
                    cell.titleTextField.placeholder = "请输入姓名"
                }else{
                    cell.titleTextField.text = self.shineilianxirenString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else if  indexPath.row == 6{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1026
                if self.shineilianxirendianhuaString == nil{
                    cell.titleTextField.placeholder = "请输入电话"
                }else{
                    cell.titleTextField.text = self.shineilianxirendianhuaString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
                
            }
            else if  indexPath.row == 7{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1027
                if self.shineiyindaorenString == nil{
                    cell.titleTextField.placeholder = "请输入姓名"
                }else{
                    cell.titleTextField.text = self.shineiyindaorenString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1028
                if self.shineiyindaorendianhuaString == nil{
                    cell.titleTextField.placeholder = "请输入电话"
                }else{
                    cell.titleTextField.text = self.shineiyindaorendianhuaString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }
            
            
            
            
           
            
            //3333****************************************************项目进展过程中需要的问题
            

        }
        else if indexPath.section == 3{
            
            
            if indexPath.row == 0{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1030
                if self.xiangmuwentimiaoshuString == nil{
                    cell.titleTextField.placeholder = "请输入问题描述"
                }else{
                    cell.titleTextField.text = self.xiangmuwentimiaoshuString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 1{
                
                
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                if self.xiangmushengshixianString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmushengshixianString
                }
                
                cell.jinduButton.addTarget(self, action: #selector(xiangmushengshixianButtonClick), for: .touchUpInside)
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
//                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
//                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
//
//
//
//                cell.titleTextField.delegate = self
//                cell.titleTextField.tag = 1031
//                if self.xiangmushengshixianString == nil{
//                    cell.titleTextField.placeholder = "请输入省市县"
//                }else{
//                    cell.titleTextField.text = self.xiangmushengshixianString
//                }
//
//
//                cell.selectionStyle = UITableViewCellSelectionStyle.none
//
//                return cell
                
            }else if indexPath.row == 2{
                
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1032
                if self.xiangmubumenmingchengString == nil{
                    cell.titleTextField.placeholder = "请输入部门名称"
                }else{
                    cell.titleTextField.text = self.xiangmubumenmingchengString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 3{
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                 cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                if self.qianyueStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.qianyueStrig
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                
                cell.jinduButton.addTarget(self, action: #selector(qianyueshijianButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
            }else if indexPath.row == 4{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1034
                if self.xiangmuxieyitouzieString == nil{
                    cell.titleTextField.placeholder = "请输入投资额"
                }else{
                    cell.titleTextField.text = self.xiangmuxieyitouzieString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if  indexPath.row == 5{
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                if self.chnayeleibieStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.chnayeleibieStrig
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                cell.jinduButton.addTarget(self, action: #selector(chanyeButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
                
            }else if indexPath.row == 6{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1036
                if self.xiangmujianshejibenString == nil{
                    cell.titleTextField.placeholder = "请输入基本内容"
                }else{
                    cell.titleTextField.text = self.xiangmujianshejibenString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 7{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1037
                if self.xiangmujianshediString == nil{
                    cell.titleTextField.placeholder = "请输入项目地"
                }else{
                    cell.titleTextField.text = self.xiangmujianshediString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if  indexPath.row == 8{
                let cell = PhotoCellTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoCellTableViewCell")
                cell.nameLbel.text = self.jinzhanArray[indexPath.row]
                
                cell.jinduButton.addTarget(self, action: #selector(qianyueButtonClick), for: .touchUpInside)
                
                if self.xiangmuString == "在谈"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 9{
    
                
                if Photoimages.count == 0{
                    let cell = PhotoImageViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoImageViewCell")
                  
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                    
                    return cell
                    
                }else{
                    
                    let cell = PhotoImageViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoImageViewCell")
                   
             
                    
                    cell.PhotoImageViewCell(model: self.Photoimages)
                    
              
                    cell.delegate = self
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                    return cell
                }
                
            }
                
                
            else if  indexPath.row == 10{
                let cell = PhotoCellTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoCellTableViewCell")
                cell.nameLbel.text = self.jinzhanArray[indexPath.row]
                
                 cell.jinduButton.addTarget(self, action: #selector(xinwenButtonClick), for: .touchUpInside)
                
                if self.xiangmuString == "在谈"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 11 {
                
                if Photoimages.count == 0{
                    let cell = xinwenImageViewTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xinwenImageViewTableViewCell")
                    
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    
                    return cell
                    
                }else{
                    
                    let cell = xinwenImageViewTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xinwenImageViewTableViewCell")
                    
                    
                    
                    cell.xinwenImageViewTableViewCell(model: self.xinwenimages)
                    
                    
                    cell.delegate = self
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    return cell
                }
                
            }else if indexPath.row == 12{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10312
                if self.xiangmutouzixieyishuString == nil{
                    cell.titleTextField.placeholder = "请输入投资协议书"
                }else{
                    cell.titleTextField.text = self.xiangmutouzixieyishuString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 13{
         
                
                
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")

                
               cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                if self.xiangmulvxingshijianString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmulvxingshijianString
                }
                
    
                
                
                    if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                
                    cell.jinduButton.isHidden = true
                
                    }
                
                    if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                
                    cell.jinduButton.isHidden = true
                
                    }

                
                
                cell.jinduButton.addTarget(self, action: #selector(lvxingshijianButtonClick), for: .touchUpInside)
       

                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 14{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10314
                if self.xiangmuleijidaoweizijinString == nil{
                    cell.titleTextField.placeholder = "请输入累计资金"
                }else{
                    cell.titleTextField.text = self.xiangmuleijidaoweizijinString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 15{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10315
                if self.xiangmudangniandaoweizijinString == nil{
                    cell.titleTextField.placeholder = "请输入到位资金"
                }else{
                    cell.titleTextField.text = self.xiangmudangniandaoweizijinString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 16{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10316
                if self.xiangmunaruleijidaoweizijinString == nil{
                    cell.titleTextField.placeholder = "请输入累计资金"
                }else{
                    cell.titleTextField.text = self.xiangmunaruleijidaoweizijinString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 17{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10317
                if self.xiangmunarudangniandaoweizijinString == nil{
                    cell.titleTextField.placeholder = "请输入到位资金"
                }else{
                    cell.titleTextField.text = self.xiangmunarudangniandaoweizijinString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }
            else{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10318
                if self.xiangmudaoweizijincailiaoString == nil{
                    cell.titleTextField.placeholder = "请输入资金证明"
                }else{
                    cell.titleTextField.text = self.xiangmudaoweizijincailiaoString
                }
                
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }
            
            
            //项目z前置手续办理情况
        }else if indexPath.section == 4{
            
            
            if indexPath.row == 0{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                if self.gongshangqingkuangStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.gongshangqingkuangStrig
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                

                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
                
            }else if indexPath.row == 1{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
               
                cell.selectionStyle = UITableViewCellSelectionStyle.none
          
                
                if self.gongshangqingkuangStrig == nil || self.gongshangqingkuangStrig == "完成"{
                     cell.titleLbel.text = "批复文号"
                }else if self.gongshangqingkuangStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.gongshangqingkuangStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1041
                if self.gongshangpifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.gongshangpifuString
                }
                
             
                
                
               
                
                return cell
            }else if indexPath.row == 2{
                 let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                                if self.lixiangshenpiStrig == nil {
                                    cell.nameLbel.text = ""
                                }else{
                                    cell.nameLbel.text = self.lixiangshenpiStrig
                                }
                
                                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick1), for: .touchUpInside)
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }else if indexPath.row == 3{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.lixiangshenpiStrig == nil || self.lixiangshenpiStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.lixiangshenpiStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.lixiangshenpiStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                    
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1043
                if self.lixiangpifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.lixiangpifuString
                }
                
                return cell
            }else if indexPath.row == 4{
                 let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                                if self.huanbaoshenpiStrig == nil {
                                    cell.nameLbel.text = ""
                                }else{
                                    cell.nameLbel.text = self.huanbaoshenpiStrig
                                }
                
                                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick2), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                return cell
            }else if indexPath.row == 5{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.huanbaoshenpiStrig == nil || self.huanbaoshenpiStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.huanbaoshenpiStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.huanbaoshenpiStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1045
                if self.huanbaopifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.huanbaopifuString
                }
                
                return cell
            }else if indexPath.row == 6{
                 let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                                if self.yongdishenpiStrig == nil {
                                    cell.nameLbel.text = ""
                                }else{
                                    cell.nameLbel.text = self.yongdishenpiStrig
                                }
                
                                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick3), for: .touchUpInside)
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }else if indexPath.row == 7{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.yongdishenpiStrig == nil || self.yongdishenpiStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.yongdishenpiStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.yongdishenpiStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1047
                if self.yongdipifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.yongdipifuString
                }
                
                return cell
            }else if indexPath.row == 8{
                 let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                                if self.guihuashenpiStrig == nil {
                                    cell.nameLbel.text = ""
                                }else{
                                    cell.nameLbel.text = self.guihuashenpiStrig
                                }
                
                                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick4), for: .touchUpInside)
                
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }else if indexPath.row == 9{
                
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                
                if self.guihuashenpiStrig == nil || self.guihuashenpiStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.guihuashenpiStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.guihuashenpiStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1049
                if self.guihuapifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.guihuapifuString
                }
                
                return cell
                
            }else if indexPath.row == 10{
                 let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                                if self.jiansheshenpiStrig == nil {
                                    cell.nameLbel.text = ""
                                }else{
                                    cell.nameLbel.text = self.jiansheshenpiStrig
                                }
                
                                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick5), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                return cell
            }else{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.jiansheshenpiStrig == nil || self.jiansheshenpiStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.jiansheshenpiStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.jiansheshenpiStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10410
                if self.jianshepifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.jianshepifuString
                }
                
                return cell
            }
            
            
            
            
            
            
            //项目建设进度
            

        }else if indexPath.section == 5{
            
            if indexPath.row == 0 {
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1050
                if self.xiangmuwanchengniandujihuaString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmuwanchengniandujihuaString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if  indexPath.row == 1{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1051
                if self.xiangmuwanchengniandushiwujihuaString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmuwanchengniandushiwujihuaString
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if  indexPath.row == 2{
                //哈哈
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                if self.xiangmuwanchenggongchengString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmuwanchenggongchengString
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                cell.jinduButton.addTarget(self, action: #selector(gongchengjiduButtonClick), for: .touchUpInside)
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                

                
            }else if indexPath.row == 3{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1053
                if self.xiangmutuijinjihuaString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmutuijinjihuaString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 4{
                
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                
                
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                if self.xiangmukaigongshijianString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmukaigongshijianString
                }
                
                
                
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }

                                if self.xiangmuString == "履约"{
                                    cell.titleLbel.textColor = UIColor.gray
                
                                    cell.jinduButton.isHidden = true
                
                                }
                
                
                
                cell.jinduButton.addTarget(self, action: #selector(kaigongshijianButtonClick), for: .touchUpInside)
                
                
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                

            }else if indexPath.row == 5{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1055
                if self.xiangmukaigongxukezhengString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmukaigongxukezhengString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }
            else if indexPath.row == 6{
               
                    let cell = PhotoCellTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoCellTableViewCell")
                    cell.nameLbel.text = self.xiangmujiansheArray[indexPath.row]
                 cell.jinduButton.addTarget(self, action: #selector(kaigongButtonClick), for: .touchUpInside)
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.xiangmuString == "在谈"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                    return cell
           
            }else if indexPath.row == 7{
                
                
                if kaigongimages.count == 0{
                    let cell = kaigongyishiTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "kaigongyishiTableViewCell")
                    
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
          
                    
                    return cell
                    
                }else{
                    
                    let cell = kaigongyishiTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "kaigongyishiTableViewCell")
                    
                    
                    
                    cell.kaigongyishiTableViewCell(model: self.kaigongimages)
                    
                    
                    cell.delegate = self
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    return cell
                }
               
                
            }else if indexPath.row == 8{
                let cell = PhotoCellTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoCellTableViewCell")
                cell.nameLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                cell.jinduButton.addTarget(self, action: #selector(jinzhanshijingButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.xiangmuString == "在谈"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                return cell
            }else {
                if xiangmuPhotoimages.count == 0{
                    let cell = xiangmuPhotoTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmuPhotoTableViewCell")
                    
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    
                    return cell
                    
                }else{
                    
                    let cell = xiangmuPhotoTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmuPhotoTableViewCell")
                    
                    
                    
                    cell.xiangmuPhotoTableViewCell(model: self.xiangmuPhotoimages)
                    
                    
                    cell.delegate = self
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    return cell
                }
            }
           
            //项目建设内容及投产前预估效益
        }else if indexPath.section == 6{
            
            
            if indexPath.row == 0{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1060
                if self.xiangmuzongzhandimianjiString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmuzongzhandimianjiString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 1{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1061
                if self.xiangmuzongjianzhumianjiString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmuzongjianzhumianjiString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 2{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1062
                if self.xiangmutouziqiangduString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmutouziqiangduString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 3{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1063
                if self.xiangmujiuyerenshuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmujiuyerenshuString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 4{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1064
                if self.xiangmunianzongchanzhiString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmunianzongchanzhiString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 5{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1065
                if self.xiangmunianshangshuifeizongeString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmunianshangshuifeizongeString
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 6{
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                if self.xiangmutouchanshijianString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmutouchanshijianString
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "开工"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                
                cell.jinduButton.addTarget(self, action: #selector(touchanshijianButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
                
//                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
//                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
//
//
//
//                cell.titleTextField.delegate = self
//                cell.titleTextField.tag = 1066
//                if self.xiangmutouchanshijianString == nil{
//                    cell.titleTextField.placeholder = "请输入信息"
//                }else{
//                    cell.titleTextField.text = self.xiangmutouchanshijianString
//                }

//                cell.selectionStyle = UITableViewCellSelectionStyle.none
//
//                return cell
                
            }else if indexPath.row == 7{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1067
                if self.xiangmujungongyanshouString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmujungongyanshouString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "开工"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 8{
                let cell = PhotoCellTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoCellTableViewCell")
                cell.nameLbel.text = self.yuguxiaoyiArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                cell.jinduButton.addTarget(self, action: #selector(chanpinxiaxianButtonClick), for: .touchUpInside)
                
                if self.xiangmuString == "在谈"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "履约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "开工"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                return cell
            }else {
                
                if chanpinimages.count == 0{
                    let cell = chanpinxiaxianTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "chanpinxiaxianTableViewCell")
                    
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    
                    return cell
                    
                }else{
                    
                    let cell = chanpinxiaxianTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "chanpinxiaxianTableViewCell")
                    
                    
                    
                    cell.chanpinxiaxianTableViewCell(model: self.chanpinimages)
                    
                    
                    cell.delegate = self
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    return cell
                }
                
            }
            
            //投产后实际效益
        }else if indexPath.section == 7{
            
            
            if indexPath.row == 0
            {
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shijixiaoyiArray[indexPath.row]

                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1070
                if self.touchanhoujiuyerenshu == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.touchanhoujiuyerenshu
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "开工"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else if indexPath.row == 1
            {
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shijixiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1071
                if self.touchannianchanzongzhi == nil
                {
                    cell.titleTextField.placeholder = "请输入信息"
                }else
                {
                    cell.titleTextField.text = self.touchannianchanzongzhi
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "开工"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else if indexPath.row == 2
            {
                
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shijixiaoyiArray[indexPath.row]

                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1072
                if self.nianshangshuifeizonge == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.nianshangshuifeizonge
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "开工"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else if indexPath.row == 3
            {
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.shijixiaoyiArray[indexPath.row]
                if self.gengxinString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.gengxinString
                }
                
                cell.jinduButton.addTarget(self, action: #selector(gengxinshijianButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
                
            }
            else
            {
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.shijixiaoyiArray[indexPath.row]
                if self.tuisong == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.tuisong
                }
                
                cell.jinduButton.addTarget(self, action: #selector(tuisongButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell

            }


            
        } else if indexPath.section == 8 {
            //办理人
            let cell = banlirenTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "banlirenTableViewCell")
            cell.banlirenButton.tag = 88
            
            cell.selectionStyle = UITableViewCellSelectionStyle.none
            
            if self.xiangmuString == "投产"{
                cell.isHidden = true
            }
            
            if self.namestring == nil
            {
                cell.banlirenButton.addTarget(self, action: #selector(banlirenButtonClick(button:)), for: .touchUpInside)
                cell.nameLabel.isHidden = true
                
                
                
            }else
            {
                cell.banlirenButton.addTarget(self, action: #selector(banlirenButtonClick(button:)), for: .touchUpInside)
                cell.nameLabel.isHidden  = false
                cell.nameLabel.text = self.namestring!

                if self.photostring == ""
                {
                     cell.banlirenButton.setImage(UIImage.init(named: "morentouxiang"), for: .normal)
                }
                else
                {
                    let url : NSURL = NSURL(string: "http://wwwqjzsyzcscom.aykj.net.cn/api\(self.photostring!)")!

                    let data : NSData = NSData(contentsOf:url as URL)!
                    let images = UIImage(data:data as Data, scale: 1.0)

                     cell.banlirenButton.setImage(images!, for: .normal)
                }

            }
             return cell
        
        }else if indexPath.section == 9{
            //审批人
            let cell = banlirenTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "banlirenTableViewCell")
            cell.banlirenButton.tag = 99
            
            cell.selectionStyle = UITableViewCellSelectionStyle.none
            if self.shenpinamestring == nil
            {
                cell.banlirenButton.addTarget(self, action: #selector(banlirenButtonClick(button:)), for: .touchUpInside)
                cell.nameLabel.isHidden = true
                
                
                
            }else
            {
                cell.banlirenButton.addTarget(self, action: #selector(banlirenButtonClick(button:)), for: .touchUpInside)
                cell.nameLabel.isHidden  = false
                cell.nameLabel.text = self.shenpinamestring!
                
                if self.shenpiphotostring == ""
                {
                    cell.banlirenButton.setImage(UIImage.init(named: "morentouxiang"), for: .normal)
                }
                else
                {
                    let url : NSURL = NSURL(string: "http://wwwqjzsyzcscom.aykj.net.cn/api\(self.shenpiphotostring!)")!
                    
                    let data : NSData = NSData(contentsOf:url as URL)!
                    let images = UIImage(data:data as Data, scale: 1.0)
                    
                    cell.banlirenButton.setImage(images!, for: .normal)
                }
                
            }
            return cell
        }
        //推送人
        else if  indexPath.section == 10{
            let cell = banlirenTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "banlirenTableViewCell")
            cell.banlirenButton.tag = 111
            
            cell.selectionStyle = UITableViewCellSelectionStyle.none
            
            if self.tuisong == nil || self.tuisong == "不推送"{
                cell.isHidden = true
                
            }else{
                cell.isHidden = false
                
            }
            
            if self.tuisongnamestring == nil
            {
                cell.banlirenButton.addTarget(self, action: #selector(banlirenButtonClick(button:)), for: .touchUpInside)
                cell.nameLabel.isHidden = true
                
                
                
            }else
            {
                cell.banlirenButton.addTarget(self, action: #selector(banlirenButtonClick(button:)), for: .touchUpInside)
                cell.nameLabel.isHidden  = false
                cell.nameLabel.text = self.tuisongnamestring!
                
                if self.tuisongphotostring == ""
                {
                    cell.banlirenButton.setImage(UIImage.init(named: "morentouxiang"), for: .normal)
                }
                else
                {
                    let url : NSURL = NSURL(string: "http://wwwqjzsyzcscom.aykj.net.cn/api\(self.tuisongphotostring!)")!
                    
                    let data : NSData = NSData(contentsOf:url as URL)!
                    let images = UIImage(data:data as Data, scale: 1.0)
                    
                    cell.banlirenButton.setImage(images!, for: .normal)
                    
                  
                }
                
            }
            return cell
        }else{
            //问题描述人
            let cell = banlirenTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "banlirenTableViewCell")
            cell.banlirenButton.tag = 122
            
            cell.selectionStyle = UITableViewCellSelectionStyle.none
            
            if self.xiangmushengshixianString == nil {
                cell.isHidden = true
                
            }else{
                cell.isHidden = false
            }
            
            if self.wentinamestring == nil
            {
                cell.banlirenButton.addTarget(self, action: #selector(banlirenButtonClick(button:)), for: .touchUpInside)
                cell.nameLabel.isHidden = true
                
                
                
            }else
            {
                cell.banlirenButton.addTarget(self, action: #selector(banlirenButtonClick(button:)), for: .touchUpInside)
                cell.nameLabel.isHidden  = false
                cell.nameLabel.text = self.wentinamestring!
                
                if self.wentiphotostring == ""
                {
                    cell.banlirenButton.setImage(UIImage.init(named: "morentouxiang"), for: .normal)
                }
                else
                {
                    let url : NSURL = NSURL(string: "http://wwwqjzsyzcscom.aykj.net.cn/api\(self.wentiphotostring!)")!
                    
                    let data : NSData = NSData(contentsOf:url as URL)!
                    let images = UIImage(data:data as Data, scale: 1.0)
                    
                    cell.banlirenButton.setImage(images!, for: .normal)
                }
                
            }
            return cell
        }
}

    //开工仪式照片
    @objc func   kaigongButtonClick() {
        print(" kaigongButtonClick")
        
        self.kaigongimages.removeAll()
        
        self.Besa64kaigongimage.removeAll()
        
        _ = self.presentHGImagePicker(maxSelected:9) { (assets) in
            //结果处理
            print("共选择了\(assets.count)张图片，分别如下：")
            
            
            let options = PHImageRequestOptions()
            
            options.isSynchronous = true
            
            options.deliveryMode = .highQualityFormat
            
            options.resizeMode = .fast
            
            
            for i in 0..<assets.count {
                
                
                let asset = assets[i]
                
                PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width: 750, height: 1920), contentMode: PHImageContentMode.default, options: options, resultHandler: { (image, value) in
                    
                    print(image!)
                    
                    self.kaigongimages.append(image!)
                    
                    
                    let image = self.kaigongimages[i] as? UIImage
                    
                    
                    
                    
                    
                    let data  = UIImageJPEGRepresentation(image!, 0.1)
                    
                    let base64 = data?.base64EncodedString(options: .endLineWithLineFeed)
                    
                    
                    
                    self.Besa64kaigongimage.append(base64!)
                    
                   
                    
                })
                
                
            }
            let indexPaths: IndexPath = IndexPath.init(row: 6, section:5)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
        }
    }
    
   
    
    //项目进度实景照片
    @objc func  jinzhanshijingButtonClick() {
        print("jinzhanshijingButtonClick")
        
        self.xiangmuPhotoimages.removeAll()
        
        self.Besa64xiangmuPhotoimage.removeAll()
        
        _ = self.presentHGImagePicker(maxSelected:9) { (assets) in
            //结果处理
            print("共选择了\(assets.count)张图片，分别如下：")
            
            
            let options = PHImageRequestOptions()
            
            options.isSynchronous = true
            
            options.deliveryMode = .highQualityFormat
            
            options.resizeMode = .fast
            
            
            for i in 0..<assets.count {
                
                
                let asset = assets[i]
                
                PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width: 750, height: 1920), contentMode: PHImageContentMode.default, options: options, resultHandler: { (image, value) in
                    
                    print(image!)
                    
                    self.xiangmuPhotoimages.append(image!)
                    
                    
                    
                    let image = self.xiangmuPhotoimages[i] as? UIImage
                    
                    
                    
                    
                    
                    let data  = UIImageJPEGRepresentation(image!, 0.1)
                    
                    let base64 = data?.base64EncodedString(options: .endLineWithLineFeed)
                    
                    
                    
                    self.Besa64xiangmuPhotoimage.append(base64!)
                    
                    
                    
                   
                    
                })
                
                
            }
            let indexPaths: IndexPath = IndexPath.init(row: 9, section:5)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
        }
    }
    //产品下线照片
    @objc func  chanpinxiaxianButtonClick() {
        print("chanpinxiaxianButtonClick")
        
        self.chanpinimages.removeAll()
        self.Besa64chanpinimage.removeAll()
        
        _ = self.presentHGImagePicker(maxSelected:9) { (assets) in
            //结果处理
            print("共选择了\(assets.count)张图片，分别如下：")
            
            
            let options = PHImageRequestOptions()
            
            options.isSynchronous = true
            
            options.deliveryMode = .highQualityFormat
            
            options.resizeMode = .fast
            
            
            for i in 0..<assets.count {
                
                
                let asset = assets[i]
                
                PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width: 750, height: 1920), contentMode: PHImageContentMode.default, options: options, resultHandler: { (image, value) in
                    
                    print(image!)
                    
                    self.chanpinimages.append(image!)
                    
                    
                    
                    let image = self.chanpinimages[i] as? UIImage
                    
                    
                    
                    
                    
                    let data  = UIImageJPEGRepresentation(image!, 0.1)
                    
                    let base64 = data?.base64EncodedString(options: .endLineWithLineFeed)
                    
                    
                    
                    self.Besa64chanpinimage.append(base64!)
                    
                    
                  
                    
                })
                
                
            }
            let indexPaths: IndexPath = IndexPath.init(row: 9, section:6)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
        }
        
    }
    
    //新闻报道
    @objc func  xinwenButtonClick() {
        print("xinwenButtonClick")
        
        self.xinwenimages.removeAll()
        
        self.Besa64xinwenimage.removeAll()
        
        _ = self.presentHGImagePicker(maxSelected:9) { (assets) in
            //结果处理
            print("共选择了\(assets.count)张图片，分别如下：")
            
            
            let options = PHImageRequestOptions()
            
            options.isSynchronous = true
            
            options.deliveryMode = .highQualityFormat
            
            options.resizeMode = .fast
            
            
            for i in 0..<assets.count {
                
                
                let asset = assets[i]
                
                PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width: 750, height: 1920), contentMode: PHImageContentMode.default, options: options, resultHandler: { (image, value) in
                    
                    print(image!)
                    
                    self.xinwenimages.append(image!)
                    
                    
                    
                    let image = self.xinwenimages[i] as? UIImage
                    
                    
                    
                    
                    
                    let data  = UIImageJPEGRepresentation(image!, 0.1)
                    
                    let base64 = data?.base64EncodedString(options: .endLineWithLineFeed)
                    
                    
                    
                    self.Besa64xinwenimage.append(base64!)
                    
             
                    
                
                    
                })
                
                
            }
            let indexPaths: IndexPath = IndexPath.init(row: 11, section:3)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
        }
    }
    //签约h照片
    @objc func  qianyueButtonClick() {

        
        self.Photoimages.removeAll()
        
        self.Besa64Photoimage.removeAll()
        
       _ = self.presentHGImagePicker(maxSelected:9) { (assets) in
            //结果处理
    
        let options = PHImageRequestOptions()
        
        options.isSynchronous = true
        
        options.deliveryMode = .highQualityFormat
        
        options.resizeMode = .fast
        
        
        for i in 0..<assets.count {
            
            
            let asset = assets[i]
            
            PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width: 750, height: 1920), contentMode: PHImageContentMode.default, options: options, resultHandler: { (image, value) in
               
             

                self.Photoimages.append(image!)
                
                
                
                
                let image = self.Photoimages[i] as? UIImage
                
                
                
                
                
                let data  = UIImageJPEGRepresentation(image!, 0.1)
                
                let base64 = data?.base64EncodedString(options: .endLineWithLineFeed)
                
          
                
                self.Besa64Photoimage.append(base64!)
 
            })

        }
        

        
        
        
        let indexPaths: IndexPath = IndexPath.init(row: 9, section:3)
        
        self.tableView.reloadRows(at: [indexPaths], with: .fade)

        }
        

    }

    

    @objc func  banlirenButtonClick(button:UIButton) {
      
        if button.tag == 88 {
            //办理人
              print(button.tag)
            let banVC =  banlirenViewController()
            banVC.ButtonTag = button.tag
            banVC.xiangmu = "录入"
            
            banVC.zhiwei = "办理人"
            self.navigationController?.pushViewController(banVC, animated: true)
        }else if button.tag == 99{
            print(button.tag)
            
            let banVC =  banlirenViewController()
            banVC.ButtonTag = button.tag
            banVC.xiangmu = "录入"
            
            banVC.zhiwei = "审批人"
            self.navigationController?.pushViewController(banVC, animated: true)
        }else if button.tag == 111{
            print(button.tag)
            
            let banVC =  banlirenViewController()
            banVC.ButtonTag = button.tag
            banVC.xiangmu = "录入"
            banVC.zhiwei = "推送人"
            self.navigationController?.pushViewController(banVC, animated: true)
        }else{
            print(button.tag)
            
            let banVC =  banlirenViewController()
            banVC.ButtonTag = button.tag
            banVC.xiangmu = "录入"
            banVC.zhiwei = "问题描述人"
            self.navigationController?.pushViewController(banVC, animated: true)
        }
        
      
    }
    

    
    
}

